本文へ移動
HZBench
すべての記事

ハウツー

How to run a CPU benchmark in your browser and read the result

A browser benchmark measures how fast your processor runs JavaScript, on one thread and on all of them. It is ideal for comparing the same device before and after a change.

執筆 HZBench編集部公開:

この記事は英語のみです。

A CPU test in a browser runs JavaScript as fast as it can and counts how much work gets done. To use more than one core it starts Web Workers, which run scripts in background threads separate from the page [1]. The browser reports how many logical processors are available through navigator.hardwareConcurrency [2], so the test knows how many workers to start.

Single-thread and multi-thread

ScoreWhat it reflectsWhere you feel it
Single threadSpeed of one core.Page responsiveness, many games, most everyday apps.
All threadsCombined speed of all logical processors.Exports, compiling, encoding, anything that splits work.
StabilityHow even the score stayed during the run.Whether the device slows down under sustained load.

Logical processors are not the same as physical cores: each physical core can usually run more than one thread [2], and two threads on one core do not double the work. That is why the multi-thread score rarely scales exactly with the thread count; HZBench shows the speed-up from all threads separately.

What moves the numbers

  • Power mode: battery-saver and quiet profiles limit processor speed. Laptops on battery often score lower than on the charger.
  • Heat: a processor that gets too hot slows down, which shows up as falling scores and lower stability over repeated runs.
  • Background work: updates, sync and other tabs take a share of the processor.
  • Browser: engines optimise JavaScript differently, so compare results in the same browser.

Step by step

  1. Plug the laptop in, close other tabs and pause large downloads or updates.
  2. Run the quick 15-second test and note the single- and all-thread scores.
  3. Run it again on battery, or after changing a power setting, and compare the saved results.
  4. For a heat check, run the test three or four times in a row and watch whether the scores fall.

Comparing two devices

Scores move a little from run to run, so run each device three times and compare the middle result. Use the same browser and version on both, plug both in, close other tabs, and let each device sit idle for a minute before the first run so background tasks after start-up have finished. If one device is a laptop, test it on the charger first; that is the condition most reviews and spec sheets assume.

What it cannot tell you

A browser score is not comparable with native benchmark suites, and it does not measure the graphics card. It is most useful as a before-and-after tool on the same device: a fresh install, a new cooling pad, a different power plan, or a second-hand laptop compared with the same model elsewhere.

出典

  1. [1] Web Workers API, MDN Web Docs (閲覧 )
  2. [2] Navigator: hardwareConcurrency property, MDN Web Docs (閲覧 )

訂正

記事の執筆と訂正の方針誤りを報告