Open fzhinkin opened 3 months ago
I tried to analyze V8 logs (I have no expertise in that area), but didn't find anything that could explain performance degradation after the first benchmark execution finished.
BTW, it seems like the regular JS target is also affected when BuiltIn
executor is used instead of BenchmarkJs
While analyzing the performance of some Kotlin stdlib functions, I faced the following issue: when running wasmJs benchmarks, the first benchmark among the batch always runs faster.
Consider the following example:
All three functions are identical (module the numeric literal), but when benchmarked,
a
is always faster:If the first function is excluded and now the run consists of only two benchmarks, the one executed earlier will be faster again:
The issue is not reproducible with js target.
You can find a demo project here: https://github.com/fzhinkin/kotlinx-benchmark-wasmjs-issue