Tag Archives: benchmark

WebKit-GTK – JSC v/s V8

Well, its been quite some time since I started to work on porting V8 Java Script Engine [1] to WebKit-GTK and recently I managed to get WebKit-GTK running with V8! This work can be found in my gitorious branch at nayankk-webkit. By default, WebKit-GTK will be built with JSC (Java Script Core) Java Script Engine, use the below command for compiling WebKit-GTK with V8 backend,

sh autogen.sh --with-jsengine=v8

After porting V8 to WebKit-GTK, next curious thing, of-course, is to compare the performance of V8 andJSC . Quite some time back, performance comparison on WebKit-Qt port by webkit.sed.hu [2] seems to favor V8 in x86 machine. This blog post captures the performance of WebKit-GTK with JSC and V8 Javascript engines taken on a x86 machine. Performance data on ARM would be the subject of another blog post.

Performance data is taken on a quad-core Intel i5 x86 reference machine with 4GB of RAM running at 2.4GHz. Operating system used is Ubuntu Natty 11.04

Build Configuration:
WebKit Revision : 91387
V8 Revision : 9014

Benchmarking procedure:
There are 3 popular Javascript performance bench-marking tools , viz, V8 bench-marking tool by Google, Sun spider bench-marking tool by WebKit community and Dromaeo bench-marking tool by Mozilla. Here I captured the bench-marking results with all 3 tools. Each of test suite in each tool is run for 5 times and average of these 5 runs is taken for comparison. Data is shared here.

V8 benchmarking :
This tools is developed by Google V8 team. Version 6 of this bench-marking tool[3] is  used here for comparison. Here are the results,

As you can see from the graph, V8 defeats JSC by significant margin in all test suites. Note that, higher the score, better the performance.

Sun-Spider benchmarking :
This Java-script bench-marking tools developed by WebKit Team[4]. Results of these tests are here,

Well, these results show that, performance of V8 is slightly less in 3d, bitops and control-flow operations. In rest of all test cases, V8 performs significantly better than JSC.

Dromaeo benchmarking:
Dromaeo[5] has a collection of Java Script performance test suite. Result here are taken for ‘All recommended tests’ of dromaeo.

As with other test suites, Dromaeo also shows significant improvement in performance when V8 engine is used. However, a notable difference is with the test cases using Prototype JS framework, most of which favor JSC over V8.

As seen with all charts, V8 seems to win against JSC, at-least in x86 machine. However, it would be interesting to see the result on an ARM target, which would be the subject of my next blog post.

[1]. http://code.google.com/p/v8/
[2]. http://webkit.sed.hu/blog/20101216/benchmarking-qtwebkit-v8-linux
[3]. http://v8.googlecode.com/svn/data/benchmarks/v6/run.html
[4]. http://www.webkit.org/perf/sunspider-0.9.1/sunspider-0.9.1/driver.html
[5]. http://dromaeo.com/