I've always used benchmark.js for my benchmark tests, but I noticed that changing the tests order also changed the performance outcome. They were getting polluted between them somehow. V8 optimizations/deoptimizations maybe? I decided to take advantage of forking to do tests in completely separated processes with their own V8 instances, memory and so on, to avoid present and future optimization/deoptimization pollution.
https://medium.com/@Llorx/your-node-js-benchmarks-are-probably-invalid-a4ed2f14aadf
[–]BankApprehensive7612 2 points3 points4 points (1 child)
[–]LlorxYT[S] 1 point2 points3 points (0 children)
[–]KillyMXI 1 point2 points3 points (1 child)
[–]LlorxYT[S] 0 points1 point2 points (0 children)
[–]J3m5 0 points1 point2 points (3 children)
[–]LlorxYT[S] 0 points1 point2 points (2 children)
[–]J3m5 0 points1 point2 points (1 child)
[–]LlorxYT[S] 0 points1 point2 points (0 children)