new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Zod · all subjects

performance & size

6 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Zod 4 benchmarks: string parsing 14.71x faster

String parsing with z.string().parse() is 14.71 times faster in Zod 4 compared to Zod 3. Zod 3 takes 363 µs/iter while Zod 4 takes 24,674 ns/iter.

Zod 4 benchmarks: array parsing 7.43x faster

Array parsing with z.array() is 7.43 times faster in Zod 4 compared to Zod 3. Zod 3 takes 147 µs/iter while Zod 4 takes 19,817 ns/iter.

Zod 4 benchmarks: object parsing 6.5x faster

Object parsing with z.object().safeParse() is 6.5 times faster in Zod 4 compared to Zod 3. Zod 3 takes 805 µs/iter while Zod 4 takes 124 µs/iter.

Zod 4 reduces tsc instantiations by 100x

A simple file with z.object() and z.string() fields that produced over 25,000 type instantiations in Zod 3 now produces only ~175 type instantiations in Zod 4.

Zod 4 fixes compiler issues with chaining extend() and omit()

In Zod 3, repeatedly chaining .extend() and .omit() on schemas caused compilation to take 4000ms and would trigger a 'Possibly infinite' error. In Zod 4, the same code compiles in 400ms (10x faster) without errors.

Zod 4 core bundle size 2.3x smaller

The core bundle size for Zod 4 is approximately 57% smaller than Zod 3. Zod 3 bundles to 12.47kb (gzip), while Zod 4 bundles to 5.36kb (gzip).

Give your agent this brain