Member-only story
JavaScriptTypescriptZodWeb DevelopmentNodejs
Zod 4.5 Cut Schema Memory 9x. Zod 4.3 Used 8x More Than Zod 3.
I ran one script against every Zod 4 minor. Memory per schema grew from 4.0 to 4.3, and 4.5 is the first that beats Zod 3.
Noor Mohammad
6 min read17 hours ago
Press enter or click to view image in full size Heap held by one z.string() schema, averaged over 20,000, on four Zod releases. Measured with the same script on 24 October 2026. Cover by the author.
One bare z.string() on Zod 4.3.6 held 12,840 bytes of heap. On Zod 3.25.76, the same call held 1,618.
So the 9x memory cut everybody quoted after Zod 4.5 is real, and it’s also mostly a repair. Zod 4 grew heavier with every minor release from 4.0 to 4.3. Version 4.4 trimmed some of that, and 4.5 is the first Zod 4 release that uses less memory per schema than Zod 3 did.…