- clone repo and run
npm install
- run
time node ./index.js
to establish a baseline for unmodified lolex. - uncomment the first line of
index.js
and comment the second line, and runtime node ./index.js
again to see the performance of a heap-queue based lolex.
With heap-based lolex -
$ time node ./index.js
All Done! 1080099
real 0m0.441s
user 0m0.563s
sys 0m0.017s
With original lolex -
$ time node ./index.js
All Done! 1080099
real 0m19.830s
user 0m19.827s
sys 0m0.064s
This queue-based implementation of lolex is incomplete - only the functions used in this sample have been implemented.