-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Readme] Versus Zod #63
Comments
Hi @c0ncentus! I will redirect you to a similar request and my response. I should take the time to update the readme, but since Zod is honestly just so popular there's no point trying to compete with it anymore, I haven't taken the time to get around to it. However since this is the second request to update the readme, I shall prioritize it soon. It is true that Zod has increased it's performance recently in the V3 version. At the time zod and myzod were both developed myzod was sometimes 2 orders of magnitude faster. That is less true today. However there's a nice project benchmarking various validators of which zod and myzod are both nowhere near the top in terms of measuring raw performance. Here are the results of running the zod and myzod testsuites today:
Output:
So as it stands today myzod is roughly 4x more performant than zod using node 20. If you are running a service and find that it is using a lot of CPU and find that your profiles are pointing to zod, myzod if a very similar alternative that could solve your performance issues. However many new projects exist that should be worth considering as well. Best of luck! |
FYI: It looks like most of the "fastest ones" require you to touch your build pipeline to transpile your typescript differently, which I assume is not for everybody. The fastest one as of writing that doesn't require build changes but still lives in th same "order of magnitude" regarding speed currently is rescript-schema, and they have a nice tale with some other relevant attributes: (and myzod is in the next available "order of magnitude" regarding speed, and zod in the category after that) With "order of magnitude" I'm referring to the number of digits in the ops/sec. |
Hi,
in the title is "myzod" => why ?
It's write myZode is faster with Node v13 ... :
as nerd I have no time for dig into every node_modules tool that exist [...].
more transparency leads more trust.
The text was updated successfully, but these errors were encountered: