|
|
|
|
|
by leeoniya
547 days ago
|
|
great points! i do a lot of JS benchmarking + optimization and whole-program measurement is key. sometimes fixing one hotspot changes the whole profile, not just shifts the bottleneck to the next biggest thing in the original profile. GC behaves differently in different JS vms. sometimes if you benchmark something like CSV parsers which can stress the GC, Benchmark.js does a poor job by not letting the GC collect properly between cycles. there's a lengthy discussion about why i use a custom benchmark runner for this purpose [1]. i can recommend js-framework-benchmark [2] as a good example of one that is done well, also WebKit's speedometer [3]. [1] https://github.com/leeoniya/uDSV/issues/2 [2] https://github.com/krausest/js-framework-benchmark [3] https://github.com/WebKit/Speedometer |
|