How fast is your browser's JavaScript engine? Eight fixed workloads — strings, regular expressions, math, sorting and search, recursion, a prime sieve, JSON and array processing — the same amount of work for every visitor, run one after another. Lower total time is better.
Benchmarking a JavaScript engine directly is older than most of the web platform features built on top of it — WebKit's SunSpider and V8's Octane were, for most of the 2010s, the numbers browser makers quoted against each other, and both were eventually retired because engines had grown fast enough, and specialised enough at recognising benchmark-shaped code, that the scores stopped tracking how a real page actually felt. This benchmark follows their format rather than their exact test code: a set of small, self-contained workloads chosen to each stress a different part of the engine, run back to back, timed as one.
Eight workloads run in sequence: building and transforming a long string; matching several regular expressions against a paragraph of generated text; a few million calls to trigonometric and logarithmic functions; sorting two hundred thousand numbers and then binary-searching the result; an unmemoised recursive Fibonacci call, which stresses function-call overhead rather than arithmetic; a sieve of Eratosthenes over three million integers using a typed array; encoding and decoding a sizeable object tree through JSON; and a filter–map–reduce chain over half a million array elements. Every workload uses a seeded pseudorandom generator where randomness is needed, so the input is identical for every visitor.
The score is the combined wall-clock time in milliseconds for all eight, timed with performance.now() — lower is better. The table above fills in with each workload's own time as the run reaches it, in case one part of an engine is unusually fast or slow relative to the rest. Everything runs on a single thread with no warm-up pass, so a first visit and a later one can differ slightly as the engine's own optimiser kicks in mid-run — the same variability real pages see.