Skip to content

xxgreg/deltablue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Update October 2014

After 2 years of hard work from the Dart team, Dart is now comfortably ahead of the JVM and V8.

Here are the raw results. (Thanks for running this Rob).

java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) 
V8 version 3.30.11 [console: dumb]
d8> 
Dart VM version: 1.7.2 (Tue Oct 14 12:12:42 2014) on "linux_x64"
DeltaBlue   Java        10x 2.6 ms
java DeltaBlue 10 secs 0.09, mem 26088, cpu 173%
DeltaBlue   Java        100x    0.75 ms
java DeltaBlue 100 secs 0.15, mem 41044, cpu 246%
DeltaBlue   Java        1000x   0.34 ms
java DeltaBlue 1000 secs 0.52, mem 79088, cpu 257%
DeltaBlue   Java        10000x  0.258 ms
java DeltaBlue 10000 secs 2.64, mem 210396, cpu 158%
DeltaBlue   Java        100000x 0.2529 ms
java DeltaBlue 100000 secs 25.36, mem 219164, cpu 108%
DeltaBlue   C   gcc 10x 0.9ms
Command exited with non-zero status 26
./deltablue 10 gcc secs 0.00, mem 652, cpu 100%
DeltaBlue   C   gcc 100x    0.51ms
Command exited with non-zero status 28
./deltablue 100 gcc secs 0.05, mem 652, cpu 100%
DeltaBlue   C   gcc 1000x   0.494ms
Command exited with non-zero status 30
./deltablue 1000 gcc secs 0.49, mem 652, cpu 100%
DeltaBlue   C   gcc 10000x  0.4947ms
Command exited with non-zero status 32
./deltablue 10000 gcc secs 4.94, mem 652, cpu 99%
DeltaBlue   C   gcc 100000x 0.49071ms
Command exited with non-zero status 34
./deltablue 100000 gcc secs 49.08, mem 656, cpu 99%
DeltaBlue   C   gcc -O3 10x 0.2ms
Command exited with non-zero status 30
./deltablue-o3 10 gcc -O3 secs 0.00, mem 656, cpu 100%
DeltaBlue   C   gcc -O3 100x    0.26ms
Command exited with non-zero status 32
./deltablue-o3 100 gcc -O3 secs 0.02, mem 656, cpu 100%
DeltaBlue   C   gcc -O3 1000x   0.231ms
Command exited with non-zero status 34
./deltablue-o3 1000 gcc -O3 secs 0.23, mem 660, cpu 100%
DeltaBlue   C   gcc -O3 10000x  0.2283ms
Command exited with non-zero status 36
./deltablue-o3 10000 gcc -O3 secs 2.28, mem 660, cpu 99%
DeltaBlue   C   gcc -O3 100000x 0.22498ms
Command exited with non-zero status 38
./deltablue-o3 100000 gcc -O3 secs 22.50, mem 660, cpu 99%
DeltaBlue   d8      10x 4ms
./d8 deltablue.js -- 10 secs 0.05, mem 15416, cpu 156%
DeltaBlue   d8      100x    0.71ms
./d8 deltablue.js -- 100 secs 0.08, mem 15580, cpu 160%
DeltaBlue   d8      1000x   0.251ms
./d8 deltablue.js -- 1000 secs 0.26, mem 19884, cpu 120%
DeltaBlue   d8      10000x  0.2002ms
./d8 deltablue.js -- 10000 secs 2.01, mem 29160, cpu 103%
DeltaBlue   d8      100000x 0.19085ms
./d8 deltablue.js -- 100000 secs 19.09, mem 46432, cpu 100%
DeltaBlue   Dart        10x 4.8ms
dart DeltaBlue.dart 10 secs 0.11, mem 14896, cpu 93%
DeltaBlue   Dart        100x    0.7ms
dart DeltaBlue.dart 100 secs 0.13, mem 16264, cpu 100%
DeltaBlue   Dart        1000x   0.202ms
dart DeltaBlue.dart 1000 secs 0.26, mem 16268, cpu 101%
DeltaBlue   Dart        10000x  0.1434ms
dart DeltaBlue.dart 10000 secs 1.49, mem 16228, cpu 100%
DeltaBlue   Dart        100000x 0.13698ms
dart DeltaBlue.dart 100000 secs 13.76, mem 18216, cpu 101%


Update - DartVM now beats JVM v1.8 see Nickolay's blog for details.
http://bonovox.be/blog/?p=128

Original (Buggy) benchmark.
http://labs.oracle.com/people/mario/java_benchmarking/index.html

Updated faster java benchmark.
https://community.cablelabs.com/svn/OCAPRI/tags/RI-I1_1_1-REL-A/ri/ODLSrc/OCAP-1.0/jvm/Sun/src/share/javavm/test/COM/sun/labs/kanban/DeltaBlue/DeltaBlue.java

C Benchmark (And the original slow Java version, plus a few others)
http://www.cl.cam.ac.uk/~mr10/Bench.html

Dart benchmark
https://github.com/dart-lang/benchmark_harness


Results, allowing enough iterations for the VM's to warm up.
gcc -O3   1x
JVM       1.2x
DartVM    1.3x
V8        1.6x
gcc       2.5x


Comments on other aspects of the benchmark:

The DartVM uses more memory than V8, and less than the JVM. Dart and V8 start
up faster than the JVM (Not much of a surprise there). However interestingly,
V8 appears to startup measurably faster than the DartVM. When testing a single
iteration, V8 consistently takes ~10ms to start the benchmark, and ~20ms to
execute it, versus Dart, which takes ~30ms to start, and also ~20 to execute.

Using a script snapshot had no measurable impact on start up time. This
probably reflects the small size of the benchmark, which doesn't use much, if
any (excluding List) of the standard library code.

At a wild guess, I'd say the start up time difference is due to Dart having a
larger standard library, thus a larger initial snapshot, which takes a little
longer to copy into memory. For usage in browsers, this 20ms headstart is
likely irrelevant as the VM can be already be started before the first code is
received.

It would be nice to see some start up benchmarks using larger applications, so
that improved start up time vs V8, can be evaluated. Perhaps using a large Dart
application, built with dart2js, running on V8, and comparing against the start
up time on the Dart VM is the way to go?



java version "1.6.0_26"
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) 
V8 version 3.17.15.1
Dart VM version: 0.4.2.8_r20259 (Tue Mar 19 23:33:54 2013)

DeltaBlue	Java		10x	9.3 ms
DeltaBlue	Java		100x	2.96 ms
DeltaBlue	Java		1000x	0.898 ms
DeltaBlue	Java		10000x	0.5229 ms
DeltaBlue	Java		100000x	0.48908 ms

DeltaBlue	C	gcc	10x	0ms
DeltaBlue	C	gcc	100x	1ms
DeltaBlue	C	gcc	1000x	0.98ms
DeltaBlue	C	gcc	10000x	0.993ms
DeltaBlue	C	gcc	100000x	0.9927ms

DeltaBlue	C	gcc -O3	10x	0ms
DeltaBlue	C	gcc -O3	100x	0.4ms
DeltaBlue	C	gcc -O3	1000x	0.39ms
DeltaBlue	C	gcc -O3	10000x	0.416ms
DeltaBlue	C	gcc -O3	100000x	0.3936ms

DeltaBlue	d8		10x	4.1ms
DeltaBlue	d8		100x	1.16ms
DeltaBlue	d8		1000x	0.729ms
DeltaBlue	d8		10000x	0.6636ms
DeltaBlue	d8		100000x	0.65464ms

DeltaBlue	Dart		10x	5.9ms
DeltaBlue	Dart		100x	1.24ms
DeltaBlue	Dart		1000x	0.636ms
DeltaBlue	Dart		10000x	0.536ms
DeltaBlue	Dart		100000x	0.55263ms