Zod v4.5 introduces schema compilation, a feature the library advertises as delivering 3 to 9 times faster validation. The release caught gajus, maintainer of the independent zod-compiler project, off guard. He says he received no advance notice and is now playing catch-up.

To answer the obvious question of how the new native feature compares to zod-compiler, he points to an internal benchmark run against Zod's pull request 6499. On every tested schema, zod-compiler is faster than z.compile(). The median advantage is 1.75x, with a range from 1.11x to 24x. The test setup used valid input, safeParse, and consumed the result. In absolute terms, z.compile() itself delivers a median speedup of 3.35x over the classic runtime validation, while zod-compiler reaches 7.0x on the same set.

Running each schema in its own process shrinks all ratios. z.compile() drops to 2.63x and zod-compiler to 4.99x. The gap between them narrows to 1.49x, and the ordering of results stays unchanged.

Gajus plans to update the zod-compiler benchmark suite to include Zod's native implementation. He expects the two approaches to eventually converge.