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
Ruby Lugdunum 2012: Message in a Bottle
Search
Konstantin Haase
June 23, 2012
Technology
2
610
Ruby Lugdunum 2012: Message in a Bottle
Konstantin Haase
June 23, 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
320
RedDotRubyConf 2014: Magenta is a Lie - and other tales of abstraction
rkh
0
960
Ancient City Ruby: Hack me, if you can!
rkh
2
440
Boston I/O: Continuous Integration
rkh
3
320
Steel City Ruby: Architecting Chaos
rkh
4
950
Other Decks in Technology
See All in Technology
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
68k
予期せぬコストの急増を障害のように扱う――「コスト版ポストモーテム」の導入とその後の改善
muziyoshiz
1
1.8k
小さく始めるBCP ― 多プロダクト環境で始める最初の一歩
kekke_n
1
390
SREのプラクティスを用いた3領域同時 マネジメントへの挑戦 〜SRE・情シス・セキュリティを統合した チーム運営術〜
coconala_engineer
2
630
Embedded SREの終わりを設計する 「なんとなく」から計画的な自立支援へ
sansantech
PRO
3
2.3k
ファインディの横断SREがTakumi byGMOと取り組む、セキュリティと開発スピードの両立
rvirus0817
1
1.3k
生成AIを活用した音声文字起こしシステムの2つの構築パターンについて
miu_crescent
PRO
2
180
日本の85%が使う公共SaaSは、どう育ったのか
taketakekaho
1
150
CDKで始めるTypeScript開発のススメ
tsukuboshi
1
370
GSIが複数キー対応したことで、俺達はいったい何が嬉しいのか?
smt7174
3
150
15 years with Rails and DDD (AI Edition)
andrzejkrzywda
0
190
Digitization部 紹介資料
sansan33
PRO
1
6.8k
Featured
See All Featured
The browser strikes back
jonoalderson
0
370
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
51
Bash Introduction
62gerente
615
210k
Visualization
eitanlees
150
17k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
A better future with KSS
kneath
240
18k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.7k
Done Done
chrislema
186
16k
Believing is Seeing
oripsolob
1
53
The Invisible Side of Design
smashingmag
302
51k
Mobile First: as difficult as doing things right
swwweet
225
10k
Transcript
MESSAGE IN A BOTTLE Konstantin Haase Ruby Lugdunum June 23,
2012
@konstantinhaase (I’m sorry about that) rkh on github
Sinatra Rack, Tilt, Rubinius, ...
None
None
None
None
None
None
Ruby 1.8 is slow because it's interpreted.
Surprise! Ruby 1.9 is interpreted, too.
THANKS
Ruby
Internals
Performance
None
RubyMotion
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
None
None
None
None
None
None
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
THANKS