Re:A lightweight TypeScript library for assertion-based runt...
by scottmas on Sunday August 24, 2025 @09:49AM
(#45004236)
The whole benefit over zod seems to be perf, so could you do some benchmarking? I wonder if it’s worth it
[ Parent
| on HN ]
Re:A lightweight TypeScript library for assertion-based runt...
by nayajunimesh on Sunday August 24, 2025 @08:54PM
(#45009200)
Yes, the primary focus is memory efficiency; performance improvement is a side effect of that. From my own benchmarks, I have found that to be the case. If you're validating thousands of objects per second or working with memory constraints, the difference becomes quite significant. Happy to share the full benchmark code if you'd like to run them yourself!
Re:A lightweight TypeScript library for assertion-based runt...
by typeofhuman on Monday August 25, 2025 @03:44PM
(#45018118)
You should include this benchmark in your repo and README if you want to build trust.
I think anything that declares itself as a performance improvement over the competition ought to prove it!
Re:A lightweight TypeScript library for assertion-based runt...
by nayajunimesh on Wednesday August 27, 2025 @06:14PM
(#45046002)
Hey, I did some benchmarks if you're interested - benchmarks results are in the README.md.
https://github.com/nimeshnayaju/zod (Fork of Zod's repo which already included benchmarks comparing Zod 4 against Zod 3, so I simply integrated my validation library)
https://github.com/nimeshnayaju/valibot-benchmarks (An unofficial benchmark suggested in another comment comparing Valibot against Zod)