Just a simple example of using benchmark library to compare the perfomance of the two pieces of code To run test: npm install npm test