Skip to content

Instantly share code, notes, and snippets.

@headius
Created April 17, 2017 17:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save headius/05e5ae524b16a5fd0b01665d9486e1b8 to your computer and use it in GitHub Desktop.
Save headius/05e5ae524b16a5fd0b01665d9486e1b8 to your computer and use it in GitHub Desktop.
Customizing Graal for JRuby
~/projects/jruby $ echo $JRUBY_GRAAL
-Xfixnum.cache=false -J-XX:+UnlockExperimentalVMOptions -J-XX:+EnableJVMCI -J-XX:+UseJVMCICompiler -J-Djvmci.Compiler=jruby-graal -J-Xbootclasspath/a:/usr/lib/jvm/jdk8-jvmci/jre/lib/jvmci/jvmci-api.jar:/usr/lib/jvm/jdk8-jvmci/jre/lib/jvmci/jvmci-hotspot.jar:/usr/lib/jvm/graalvm/lib/graal/graal.jar -Xcompile.invokedynamic
~/projects/jruby $ jruby mandelbrot.rb
1.568706
1.263336
1.2612649999999999
1.185973
1.188513
1.196141
1.1832500000000001
1.1738950000000001
1.1787750000000001
1.1836799999999998
1.177073
1.173415
1.165675
1.1799030000000001
1.167859
1.18124
1.1891969999999998
1.169011
1.171051
1.17486
~/projects/jruby $ jruby -Xcompile.invokedynamic mandelbrot.rb
1.237169
0.7084459999999999
0.6838650000000001
0.659342
0.745088
0.6648620000000001
0.649168
0.6505540000000001
0.648953
0.639765
0.653462
0.64859
0.645602
0.629986
0.632386
0.628902
0.635348
0.6331100000000001
0.6336080000000001
0.626798
~/projects/jruby $ jruby $JRUBY_GRAAL mandelbrot.rb
0.737211
0.427491
0.072004
0.075777
0.10040600000000001
0.109073
0.11461500000000001
0.112447
0.073181
0.080539
0.073155
0.072808
0.07056499999999999
0.073722
0.073304
0.08178400000000001
0.072471
0.07209099999999999
0.07018600000000001
0.07152
@chrisseaton
Copy link

What's the modification? Was it something about disabling identity for your Fixnum box objects?

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