Zod 4.5: z.compile() precompilation speeds parse up to 9x, slashes memory
Zod 4.5 introduces z.compile(), an AOT schema compiler that speeds up parsing of objects, arrays, and unions by ~3–9x. Combined with z.validate()—a fast boolean check that skips ZodError construction—invalid inputs are up to 16x cheaper to reject than safeParse. Benchmarks show 47.5M ops/s on the Moltar parseSafe fixture, ahead of typia's 45.3M. A move of bound methods to prototypes cuts per-schema heap retention by up to 9.8x. The release also includes breaking changes: string length now counts Unicode code points, z.iso.datetime() requires seconds, record keys and intersections match TypeScript semantics, and __proto__ is always stripped. Useful for TS teams doing heavy runtime validation in services, forms, and data pipelines.