V8 and JavaScriptCore Compared

Following on from the release of Google’s new Chrome browser and their corresponding V8 Javascript engine, I thought I’d see how WebKit’s JavascriptCore compares to V8 using Google’s benchmark suite.

Since I’m running on a Mac, I can’t use the browser to run the test suite, so I built the V8 engine and it’s shell, and compared it to the latest WebKit build available (at the time of writing r36013), and used the jsc shell I mentioned in my last post to run the tests through JavascriptCore.

Well, the results are pretty impressive:

  • JavaScriptCore, run via the jsc shell: 457
  • V8 shell: 2127!

Even if the code was optimised around these benchmarks, it’s very likely that it would still blow away the JSC engine under most conditions.

Update: 04/09/2008 I’ve run the tests again on the latest build of JavaScriptCore/SquirrelFish. Looks like some recent builds have significantly pushed up their v8 benchmark score:

WebKit r36083: 597

Also, given that most other benchmarks show less of a performance gap on “real-world” functionality (and on the Dromaeo benchmark JSCore comes out on top), these results are not idicative of the level of performance users should expect in a browser context.

These tests were run on a quad-core 2.6GHz Mac Pro with 3GB RAM. Each test was run 4 times



  1. RichB §

    So a full JIT is only 4.5 times faster than a bytecode interpreter? That sounds very poor.


  2. Melissa §

    SquirrelFish is not a JIT. The release announcement http://webkit.org/blog/189/announcing-squirrelfish/ says:

    SquirrelFish is a register-based, direct-threaded, high-level bytecode engine, with a sliding register window calling convention. It lazily generates bytecodes from a syntax tree, using a simple one-pass compiler with built-in copy propagation.


  3. Andrew §

    My mistake. I should have read the team's definition of the engine before stating that it was a full-blown JIT. I've updated my statement.