Giter Club home page Giter Club logo

validator-benchmark's Introduction

validator benchmark

Packages in benchmark

Package Stars Quality
validator.js 251 70
validate.js 2,132 73
validatorjs 1,119 71
joi 13,645 89
ajv 6,468 87
mschema (*) 107 31
parambulator (*) 41 68
fastest-validator 691 68
yup 7,314 71

(*) not supported advanced types (email, url, ...etc)

Benchmark #1 (simple object)

Test object

let object = {
    name: "john doe",
    email: "[email protected]",
    firstName: "John",
    phone: "123-4567",
    age: 33
}

Code

/suites/simple.js

Result

Platform info:
==============
   Windows_NT 6.1.7601 x64
   Node.JS: 10.16.0
   V8: 6.8.275.32-node.52
   Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz × 8

Suite: Simple object
√ validator.js                566,527 rps
√ validate.js                 212,279 rps
√ validatorjs                 197,163 rps
√ joi                         162,628 rps
√ ajv                       7,246,357 rps
√ mschema                     677,122 rps
√ parambulator                 24,562 rps
√ fastest-validator         8,279,376 rps
√ yup                          20,783 rps

   validator.js            -93.16%        (566,527 rps)   (avg: 1μs)
   validate.js             -97.44%        (212,279 rps)   (avg: 4μs)
   validatorjs             -97.62%        (197,163 rps)   (avg: 5μs)
   joi                     -98.04%        (162,628 rps)   (avg: 6μs)
   ajv                     -12.48%      (7,246,357 rps)   (avg: 138ns)
   mschema                 -91.82%        (677,122 rps)   (avg: 1μs)
   parambulator             -99.7%         (24,562 rps)   (avg: 40μs)
   fastest-validator            0%      (8,279,376 rps)   (avg: 120ns)
   yup                     -99.75%         (20,783 rps)   (avg: 48μs)
-----------------------------------------------------------------------

Result

validator-benchmark's People

Contributors

icebob avatar jrylan avatar gianpaj avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.