Perf quest


What’s this about?

perf-quest is a repository containing some comparative tests of JavaScript performance.

For example, if there is performance concern in your project and you are in doubt if you are going to write a for or a forEach you can see here the result of the comparison between them.

The tests are neither scientific nor rigorous, the idea is to have a basic notion of difference between A and B only.

The tools that are being used in this project:


A little utility for doing side-by-side benchmarks in nodejs.


A robust benchmarking library that supports high-resolution timers & returns statistically significant results.

How to add a new test case:

1) Create a new directory using the rule foo-bar or function_foo-function_bar

2) Create benchmark.js and benchmark2.js files and add your bench code (look the other tests to get help).

3) Copy Makefile.example from the root directory and rename it to Makefile.

4) Type make inside your test case directory, and you can see the result on generated file.

To run all the tests type make from project root directory.

Notable differences between node 6.9.1 and 7.10.0:

classe vs prototype

filter and filter by hand

for and forEach

hidden class and no extra hidden class

object assign vs util extend

reduce vs reduce by hand

Leave a Reply