Rubies
A look into Ruby's shiny future
Rubies
A look into Ruby's shiny future
who am i
IVO anjo
Ruby ❤
CONCURRENCY ❤
}
JRuby ❤
@knux
{talkdesk_ruby_ninja: self}
“Historical” interlude
MRI RUBY
yukihiro “MATZ” matsumoto
Matz's ruby interpreter
most used ruby
defines what ruby is
MRI ≤ 1.8
simple ast interpreter
simple mark'n'sweep GC
GIL
MRI 1.9
yarv bytecode interpreter
zendesk: “2-3× faster”
BY KOICHI SASADA
MRI 2.1
Rgengc generational gc
BY KOICHI SASADA
MRI 2.2
incremental+generational GC
BY... KOICHI SASADA
symbols can now be gc'd ❤
“The idea of this symbol GC is invented by Sasada Koichi”
BY... NARIHIRO NAKAMURA
enough history
Let's LOOK FORWARD
MRI 3 ?
optcarrot
ruby 3×3
benchmarks?
MRI 3 ?
status: proposal
ruby guilds
YES, BY KOICHI SASADA, AGAIN!
new concurrency model
group threads in guilds
each guild gets its own gil
comm via message passing
MRI ??
@tenderlove
COMPACTING GC
Separate heaps for classes/modules/...
status: soon...ish?
MRI ??
not KOICHI SASADA this time
deoptimization engine
why deoptimize?
Y U MAKE MY RUBY SLEWERS!?
status: WIP PR
MRI ??
deoptimization is key to performance
nobody redefined integer#+? let's inline
oops someone changed it ⤑ OPTIMIZATION IS UNDONE,
WE STILL COOL
ruby+
eclipse omr: ibm j9 jVM REUSABLE COMPONENTS
ON TOP OF MRI 2.4
status: tech preview
rvm soon...?
omr GC
omr jit compiler engine
ibm health center monitoring tools
ruby+
MRI ??
OMR is not alone...?
another ruby by matz!?
aot compiled to machine code
based off of ruby 1.8
(no rails, no meta)
TARGETS embedded, embeddable and cli apps
jruby
status: over 9000
aka “better performance and true parallelism, today”
Ruby using java vm
status: used IN PRODUCTION
jruby
faster than mri
NO gil
java gc miles ahead of ruby gc (sorry koichi-senpai!)
jruby
use ruby
webservers
call java/scala/clojure
kotlin/JAVASCRIPT code
jruby
can use java webservers (hello netty!)
SINGLE .JAR/.WAR FILE APPLICATION DEPLOY
BETTER MEMORY VISUALIZATION
LIVE ALLOCATION, DUMPING
THREAD utilization and state
SAMPLING PROFILERS
jruby ?
deoptimization
graal compiler
ruby 2.4
jmeh?
SLOW STARTUP: use --dev
no c extensions (FFI WORKS)
NO gil
memory harder to tune
truffleruby
new (2013) ruby on the do; end
aka
“ruby world DOMINATION ENGINE”
speculative optimization
previously known as jruby+truffle
uses truffle java framework
REMEMBER OPTCARROT?
Optcarrot results by Benoit Daloze (@eregontp)
https://eregon.me/blog/2016/11/28/optcarrot.html