Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Aloha Ruby Conf 2012: Message in a Bottle
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Konstantin Haase
October 10, 2012
5
2.1k
Aloha Ruby Conf 2012: Message in a Bottle
Konstantin Haase
October 10, 2012
Tweet
Share
More Decks by Konstantin Haase
See All by Konstantin Haase
RubyConf Philippines 2017: Magenta is a Lie
rkh
0
220
How We Replaced Salary Negotiations with a Sinatra App
rkh
17
4.3k
HTTP (RubyMonsters Edition)
rkh
5
1.2k
GCRC 2015: Abstract Thoughts on Abstract Things
rkh
1
380
Frozen Rails: Magenta - The Art Of Abstraction
rkh
3
330
RedDotRubyConf 2014: Magenta is a Lie - and other tales of abstraction
rkh
0
970
Ancient City Ruby: Hack me, if you can!
rkh
2
450
Boston I/O: Continuous Integration
rkh
3
320
Steel City Ruby: Architecting Chaos
rkh
4
960
Featured
See All Featured
Fireside Chat
paigeccino
42
3.8k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
96
Documentation Writing (for coders)
carmenintech
77
5.3k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
HDC tutorial
michielstock
1
510
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Facilitating Awesome Meetings
lara
57
6.8k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Designing Powerful Visuals for Engaging Learning
tmiket
0
260
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.7k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
Skip the Path - Find Your Career Trail
mkilby
1
72
Transcript
MESSAGE IN A BOTTLE Konstantin Haase Aloha Ruby Conference October
8, 2012
Ruby 1.8 is slow because it's interpreted.
Surprise! Ruby 1.9 is interpreted, too.
THANKS
@konstantinhaase (I’m sorry about that) rkh on github
None
None
None
None
None
None
WWAPD
Ruby
Internals
Performance
None
RubyMotion rupypy
WHAT WE’LL LOOK INTO MRI: method dispatch and execution Rubinius:
inline caches and JIT JRuby: invokedynamic
None
THEY JUST LOVE BYTECODE
None
MRI
Rubinius
JRuby (JVM 1.6)
None
Source Code Parser Parse Tree Interpreter Bytecode Compiler Bytecode Interpreter
JIT Machine Code CPU VM
THE PLAN Find Method Execute Method
Performance
HOW TO SPEED UP? Find Method Faster Execute Method Faster
FIND FASTER Inline Cache (aka Call/ Send Site Cache) Lookup
Cache Inlining
EXECUTE FASTER Reduce operations Just-in-time compilation Speed up search
None
rb_method_entry rb_method_entry_without_cache search_method
None
None
None
None
None
None
Module MethodTable Bucket CompiledCode
None
None
None
None
InlineCache MachineCode CompiledCode initial_backend execute_backend cache_[cTrackedICHits] execute empty_cache ...
None
SPECIALIZED METHODS cached bytecode code with breakpoints specialized for arguments
JITed code
None
None
None
None
None
None
None
Process invokedynamic JVM method bootstrap guard fallback
None
Reducing CPU instructions Reducing jumps Not breaking late binding
caching inlining JITing guards
FAST LOOKUP FAST EXECUTION
THANKS