Skip to content

Instantly share code, notes, and snippets.

@headius
Created December 18, 2011 16:53
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save headius/1493911 to your computer and use it in GitHub Desktop.
Save headius/1493911 to your computer and use it in GitHub Desktop.
Latest red/black tree benchmark results on Java 7, with and without invokedynamic
system ~/projects/jruby $ jruby -v bench/bench_red_black.rb
jruby 1.7.0.dev (ruby-1.8.7-p352) (2011-12-18 43cbc21) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java]
2.748
1.902
1.87
1.877
1.873
1.868
1.864
1.876
1.884
1.886
system ~/projects/jruby $ pickjdk 5
New JDK: 1.7.0u.jdk
system ~/projects/jruby $ jruby -v -Xcompile.invokedynamic=false bench/bench_red_black.rb
jruby 1.7.0.dev (ruby-1.8.7-p352) (2011-12-18 43cbc21) (OpenJDK 64-Bit Server VM 1.7.0-u2-b21) [darwin-amd64-java]
2.367
1.415
1.378
1.522
1.416
1.395
1.405
1.416
1.415
1.395
system ~/projects/jruby $ jruby -v bench/bench_red_black.rb
jruby 1.7.0.dev (ruby-1.8.7-p352) (2011-12-18 43cbc21) (OpenJDK 64-Bit Server VM 1.7.0-u2-b21) [darwin-amd64-java]
3.225
1.064
0.792
0.728
1.333
1.005
0.677
0.687
0.673
0.679
system ~/projects/jruby $ rvm 1.9.3 do ruby bench/bench_red_black.rb
3.426258
3.415173
3.475542
3.497635
3.43508
3.491093
3.413686
3.542578
3.437846
3.626295
@headius
Copy link
Author

headius commented Dec 21, 2011

There will always be cases where we win or where we lose. Java 7's features have made the win cases more frequent and more impressive. In general if we are slower we consider it a bug and would like bug reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment