Benchmarking Chrome’s V8 Javascript engine

by Richard Bradshaw

Having previously looked at the memory usage of Google’s Chrome, it’s time to analyse it’s much mentioned javascript engine, V8. Assumedly named after the engine with the same name, V8 compiles javascript to machine code, rather than bytecode to achieve greater performance. In this respect, it’s similar to Firefox 3.1′s TraceMonkey, a JIT javascript compiler again developed to achieve much greater speeds when running javascript.

Anyway, enough of the description, lets look at some results.

We will examine the benchmarks developed by Google to test V8. (Yes, this may provide some bias…)

For each browser these are the average of 3 runs, though each repeat generally yielded a difference of only 1 or two points implying that the benchmarks are already repeated before the results are shown.

First, a summary graph:

Then a breakdown for each individual test:

In these benchmarks, the higher the score, the better the performance.

It’s clear straight away that Chrome is fast. Raw scores show that Chrome runs these tests 10 times faster than Firefox 3.1 (1009 vs. 101), and 40 times faster than IE 8b2 (1009 vs. 23).

Google describes these tests as so:

  • Richards
    OS kernel simulation benchmark, originally written in BCPL by Martin Richards (539 lines).
  • DeltaBlue
    One-way constraint solver, originally written in Smalltalk by John Maloney and Mario Wolczko (880 lines).
  • Crypto
    Encryption and decryption benchmark based on code by Tom Wu (1689 lines).
  • RayTrace
    Ray tracer benchmark based on code by Adam Burmister (3418 lines).
  • EarleyBoyer
    Classic Scheme benchmarks, translated to JavaScript by Florian Loitsch’s Scheme2Js compiler (4682 lines).
From these descriptions, it’s clear that they aren’t specifically written for V8, as they are benchmarks that already existed in other languages. For all the browsers, the results appear in the same order implying that they all have the same strengths and weaknesses when the speeds are scaled.
Found different results? Let me know in the comments!

Related Posts