External Publication
Visit Post

Browser Support • Re: Measuring JavaScript execution time

Pale Moon forum - Forum index [Unofficial] March 9, 2026
Source

The common way to more accurately benchmark is to measure runs/s, not raw timing. i.e. measure a start time, then run your test in a loop incrementing a counter to keep track of the number of loops performed, until at least end time - start time > 1s (or multiple for accuracy), then just divide the loops run through (counter) by the actual time taken (end - start, adjusted to seconds) to get the benchmark score.

As for a preference, no, we currently don't have a preference for this. Although we may want to revisit this to make it a bit more fine-grained again as spectre and meltdown have been mitigated and/or are no longer as much of a concern on current hardware.


Discussion in the ATmosphere

Loading comments...