# Crafting Interpreters, chapter 30

> Week 28 of the cracked.guide path: Ch 30: Optimization; LeetCode: 2 NeetCode 150 problems.

Week 28 of 145 on cracked.guide, in Crafting Interpreters: Crafting Interpreters 30: Optimization and 2 NeetCode 150 problems. The reading guides budget about 6 hours.

## Key facts {#key-facts}

- [Crafting Interpreters 30: Optimization](https://cracked.guide/guide/ci-30): Profiling and optimization: replacing modulo with bit masking in the hash table, then NaN boxing to pack every Lox value into 64 bits, with benchmarks showing the speedup.
- Phase: Crafting Interpreters, weeks 1 to 28.
- Updated October 20, 2026.

## By the end of this week you can {#objectives}

- Use a profiler to find a hotspot before changing any code.
- Explain why masking with capacity minus one can replace modulo.
- Implement NaN boxing behind a compile-time flag.

## This week's tasks {#tasks}

- [Crafting Interpreters chapter 30, Optimization](https://cracked.guide/guide/ci-30): about 6 hours
- LeetCode: 2 NeetCode 150 problems

Previous: [Week 27](https://cracked.guide/curriculum/week/27) · Next: [Week 29](https://cracked.guide/curriculum/week/29)

---

Source: https://cracked.guide/curriculum/week/28
cracked.guide: A free, dated 145-week path to getting genuinely cracked at programming.
