BlogRSS4 posts
Zod 4.5
Zod 4.5 is now available, with z.compile() ahead-of-time compilation, up to 9x less memory per schema, and a batch of long-awaited features.
Reducing Zod's memory footprint by an order of magnitude with method memoization
A bare z.string() retained 7.5kb of heap in Zod 4.4. In Zod 4.5 it retains 784 bytes. One change to where a schema's methods live accounts for nearly all of it.
Introducing
z.compile()z.compile() walks a schema once and produces a flat, loop-free JavaScript validator that runs far faster than the standard parser. Arrays, unions, and nested or wide objects parse 3 to 7x faster, with identical output and identical errors.
Joining Clerk as an OSS Fellow to work on Zod 4
Announcing my Clerk OSS Fellowship and what's coming in Zod 4.