Fork me on GitHub
COMPARE JS Compare features and performance of similar js libraries (not just stats)

How To

To add benchmark test for a js library/code, or npm package

Create a performance test similar to below code;

var Benchmark = require('benchmark');

var id = "sample001"; //Manadatory
var suite = new Benchmark.Suite(id);
// add tests 
suite.add('RegExp#test', function() {
  /o/.test('Hello World!');
})
.add('String#indexOf', function() {
  'Hello World!'.indexOf('o') > -1;
})

module.exports = suite

Now either submit it via creating an issue on github. Or add yourself.
To add yourself,

  • go to tests folder. Add the above test. (check archived folder for more ideas)
  • Add profile entry
  • Add dev dependency in package.json (if any)
  • run npm run benchmarktest
  • check if a new file is generated in reports folder

What is compared yet?

This project will grow slowoly. Because I'll be adding JS/NPM libraries and code that I'm gonna add in my other projects. But you are welcome to add the benchmarks that you wish.

You can type and check above in tag selector to know which libraries are added yet.