Skip to content
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

Compare versions of joi #6

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

afharo
Copy link
Contributor

@afharo afharo commented May 12, 2021

joi has improved a bit with the newer versions. This PR adds the comparison between joi@13 and joi@17 (latest).

The results are:

node --version
v14.16.1

Valid input:

runtypes x 284,518 ops/sec ±1.06% (84 runs sampled)
io-ts x 757,623 ops/sec ±0.90% (86 runs sampled)
io-ts (using is instead of decode) x 2,449,756 ops/sec ±0.80% (88 runs sampled)
tcomb-validation x 77,336 ops/sec ±1.09% (86 runs sampled)
joi@13 x 59,894 ops/sec ±0.51% (90 runs sampled)
joi@17 x 78,412 ops/sec ±0.85% (87 runs sampled)
ajv x 9,189,166 ops/sec ±0.76% (89 runs sampled)
Fastest is ajv

Invalid input:

runtypes x 276,551 ops/sec ±1.02% (89 runs sampled)
io-ts x 621,990 ops/sec ±1.32% (90 runs sampled)
io-ts (using is instead of decode) x 2,593,926 ops/sec ±0.91% (84 runs sampled)
tcomb-validation x 49,194 ops/sec ±0.91% (88 runs sampled)
joi@13 x 15,160 ops/sec ±0.96% (89 runs sampled)
joi@17 x 45,473 ops/sec ±0.84% (89 runs sampled)
ajv x 6,781,009 ops/sec ±0.71% (90 runs sampled)
Fastest is ajv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant