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

bench: add yup and fastest-validators to the benchmarks #463

Merged
merged 1 commit into from
Nov 3, 2020

Conversation

dirkdev98
Copy link
Member

Should've found fastest-validator earlier, since it does some stuff the same way as the generated validators, but we are a good chip slower than them.

Should've found fastest-validator earlier, since it does some stuff the same way as the generated validators, but a good chip slower than them.
@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2020

==== C8 test coverage ====
Statements: 70.38% ( 18024/25611 )
Branches : 71.55% ( 2113 /2953 )
Functions : 70.72% ( 669 /946 )
Lines : 70.38% ( 18024 /25611 )

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2020

==== Benchmark result ====

Node.js version: 14

Total benchmarks: 13
          Passed: 13
          Failed: 0
-----------
lbu validator simple                    5000000  iterations      483  ns/op
yup validator simple                      20000  iterations    58988  ns/op
fastest-validator validator simple     10000000  iterations      135  ns/op
lbu validator nested                      50000  iterations    48019  ns/op
yup validator nested                       5000  iterations   418643  ns/op
fastest-validator validator nested      2000000  iterations      859  ns/op
logger - strings                         500000  iterations     2484  ns/op
logger - objects                         500000  iterations     2796  ns/op
logger - deep objects                    500000  iterations     4787  ns/op
uuid                                    2000000  iterations      541  ns/op
uuid.isValid                           10000000  iterations      156  ns/op
isNil                                 500000000  iterations        0  ns/op
isPlainObject                         100000000  iterations       18  ns/op

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2020

==== Benchmark result ====

Node.js version: 15

Total benchmarks: 13
          Passed: 13
          Failed: 0
-----------
lbu validator simple                    5000000  iterations      500  ns/op
yup validator simple                      20000  iterations    63735  ns/op
fastest-validator validator simple     10000000  iterations      136  ns/op
lbu validator nested                      50000  iterations    48554  ns/op
yup validator nested                       5000  iterations   411493  ns/op
fastest-validator validator nested      2000000  iterations      867  ns/op
logger - strings                         500000  iterations     2329  ns/op
logger - objects                         500000  iterations     2802  ns/op
logger - deep objects                    500000  iterations     4431  ns/op
uuid                                    2000000  iterations      641  ns/op
uuid.isValid                           10000000  iterations      170  ns/op
isNil                                 500000000  iterations        0  ns/op
isPlainObject                         100000000  iterations       19  ns/op

@dirkdev98 dirkdev98 merged commit 73a22eb into main Nov 3, 2020
@dirkdev98 dirkdev98 deleted the feat/bench-validators branch November 3, 2020 20:02
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.

1 participant