7 ms·
The whole benefit over zod seems to be perf, so could you do some benchmarking? I wonder if it’s worth it
by scottmas 1y ago
The whole benefit over zod seems to be perf, so could you do some benchmarking? I wonder if it’s worth it
- nayajunimesh 1y agoYes, 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!
- deleted 1y ago[deleted]
- typeofhuman 1y agoYou 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!
- nayajunimesh 1y agoHey, I did some benchmarks if you're interested - benchmarks results are in the README.md. https://github.com/nimeshnayaju/zod 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 https://github.com/nimeshnayaju/valibot-benchmarks (An unofficial benchmark suggested in another comment comparing Valibot against Zod)