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
JITをたどるとそこはYARVの中
Search
Tsukasa OISHI
June 21, 2019
Technology
0
550
JITをたどるとそこはYARVの中
Tsukasa OISHI
June 21, 2019
Tweet
Share
More Decks by Tsukasa OISHI
See All by Tsukasa OISHI
怖くないメモリ肥大化
tsukasa_oishi
1
52
SLI/SLO をストリーム アラインドチームに導入した話
tsukasa_oishi
0
150
The Cacher in the Rye
tsukasa_oishi
1
5.8k
ISeqで遊ぼう
tsukasa_oishi
0
5k
Rubyを30倍速くした話
tsukasa_oishi
0
1.1k
はてブ砲をくらったときのお話
tsukasa_oishi
0
1.9k
食べログで動いている自作ライブラリのお話
tsukasa_oishi
0
290
奥さんとプログラミングを両立させる方法
tsukasa_oishi
0
50
MiyazakiResistanceを作ってみたよ
tsukasa_oishi
0
890
Other Decks in Technology
See All in Technology
AWS re:Invent 2024 ふりかえり
kongmingstrap
0
130
プロダクト開発を加速させるためのQA文化の築き方 / How to build QA culture to accelerate product development
mii3king
1
260
PHP ユーザのための OpenTelemetry 入門 / phpcon2024-opentelemetry
shin1x1
1
160
re:Invent 2024 Innovation Talks(NET201)で語られた大切なこと
shotashiratori
0
300
20241214_WACATE2024冬_テスト設計技法をチョット俯瞰してみよう
kzsuzuki
3
440
小学3年生夏休みの自由研究「夏休みに Copilot で遊んでみた」
taichinakamura
0
150
Microsoft Azure全冠になってみた ~アレを使い倒した者が試験を制す!?~/Obtained all Microsoft Azure certifications Those who use "that" to the full will win the exam! ?
yuj1osm
2
110
2024年にチャレンジしたことを振り返るぞ
mitchan
0
130
Oracle Cloud Infrastructure:2024年12月度サービス・アップデート
oracle4engineer
PRO
0
170
re:Invent をおうちで楽しんでみた ~CloudWatch のオブザーバビリティ機能がスゴい!/ Enjoyed AWS re:Invent from Home and CloudWatch Observability Feature is Amazing!
yuj1osm
0
120
複雑性の高いオブジェクト編集に向き合う: プラガブルなReactフォーム設計
righttouch
PRO
0
110
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
4
550
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
137
6.7k
Gamification - CAS2011
davidbonilla
80
5.1k
Making the Leap to Tech Lead
cromwellryan
133
9k
Being A Developer After 40
akosma
87
590k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.3k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Fireside Chat
paigeccino
34
3.1k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
170
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
440
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.4k
Transcript
+*5ΛͨͲΔͱ ͦ͜:"37ͷத
͓͓͍͔ͭ͠͞
ruby --jit
def fib(num) if num < 2 num else fib(num -
2) + fib(num - 1) end end
fib(35)
$ time ruby fib.rb real 0m1.636s user 0m1.520s sys 0m0.050s
$ time ruby —jit fib.rb real 0m0.786s user 0m1.280s sys
0m0.050s
Ͳ͏ͯ͘͠ͳΔͷʁ
ϝιουͷόΠτίʔυΛ $ʹมͯ͠ίϯύΠϧ͠ ͯTPϑΝΠϧΛ࡞ͯ͠ EMTZNͯ͠खʹೖΕͨؔ ϙΠϯλΛͬͯϚγϯޠ
1IPUPCZ"MFYJT#SPXOPO6OTQMBTI ͍ͭ͜ɺͳʹݴͬͯΜͩʁ
7.Α͘Βͳ͍͚Ͳ ͍ͬͯΔΑ͏ͳإ ͠ͱ͜͏ 1IPUPCZ$BMMVN8BMFPO6OTQMBTI
None
:"37 3VCZ7. ΛΕ+*5 Θ͔Δ ͣ
͋ͱͰ3VCZ,BJHJ ͷ+*5ͷηογϣϯ͕ Θ͔ΔΑ͏ʹͳΓ·͢ ͣ
ίϯϐϡʔλ
None
ిࢠܭࢉػ
2 * 3 + 4 * 5
2 3 * 4 5 * +
2 3 * 4 5 * + ελοΫ
2 3 * 4 5 * + ελοΫ 2 PUSH
2
2 3 * 4 5 * + ελοΫ 2 3
PUSH 2 PUSH 3
2 3 * 4 5 * + ελοΫ 6 PUSH
2 PUSH 3 MUL
2 3 * 4 5 * + ελοΫ 6 4
PUSH 2 PUSH 3 MUL PUSH 4
2 3 * 4 5 * + ελοΫ 6 4
5 PUSH 2 PUSH 3 MUL PUSH 4 PUSH 5
2 3 * 4 5 * + ελοΫ 6 20
PUSH 2 PUSH 3 MUL PUSH 4 PUSH 5 MUL
2 3 * 4 5 * + ελοΫ 26 PUSH
2 PUSH 3 MUL PUSH 4 PUSH 5 MUL ADD
3VCZ͚͕ͩಈ͘ઐ༻ͷίϯϐϡʔλ
2 * 3 + 4 * 5
2 3 * 4 5 * +
2 3 * 4 5 * + ελοΫ
2 3 * 4 5 * + ελοΫ 2 putobject
2
2 3 * 4 5 * + ελοΫ 2 3
putobject 2 putobject 3
2 3 * 4 5 * + ελοΫ 6 putobject
2 putobject 3 opt_mult mid:*, argc:1
2 3 * 4 5 * + ελοΫ 6 4
putobject 2 putobject 3 opt_mult mid:*, argc:1 putobject 4
2 3 * 4 5 * + ελοΫ 6 4
5 putobject 2 putobject 3 opt_mult mid:*, argc:1 putobject 4 putobject 5
2 3 * 4 5 * + ελοΫ 6 20
putobject 2 putobject 3 opt_mult mid:*, argc:1 putobject 4 putobject 5 opt_mult mid:*, argc:1
2 3 * 4 5 * + ελοΫ 26 putobject
2 putobject 3 opt_mult mid:*, argc:1 putobject 4 putobject 5 opt_mult mid:*, argc:1 opt_plus mid:+, argc:1
2 3 * 4 5 * + ελοΫ 26 putobject
2 putobject 3 opt_mult mid:*, argc:1 putobject 4 putobject 5 opt_mult mid:*, argc:1 opt_plus mid:+, argc:1 όΠτίʔυ
ϝιουͷόΠτίʔυΛ $ʹมͯ͠ίϯύΠϧ͠ ͯTPϑΝΠϧΛ࡞ͯ͠ EMTZNͯ͠खʹೖΕͨؔ ϙΠϯλΛͬͯϚγϯޠ
putobject 2 putobject 3 opt_mult mid:*, argc:1 putobject 4 putobject
5 opt_mult mid:*, argc:1 opt_plus mid:+, argc:1 όΠτίʔυ :"37 3VCZ7.
putobject 2 putobject 3 opt_mult mid:*, argc:1 putobject 4 putobject
5 opt_mult mid:*, argc:1 opt_plus mid:+, argc:1 όΠτίʔυ :"37 3VCZ7.
putobject 2 putobject 3 opt_mult mid:*, argc:1 putobject 4 putobject
5 opt_mult mid:*, argc:1 opt_plus mid:+, argc:1 όΠτίʔυ :"37 3VCZ7. ϋʔυΣΞͰͳ͘ ιϑτΣΞͰԾతʹ࡞ΒΕͨܭࢉػ
+VTU*O5JNF $PNQJMFS
ͳΜͷͨΊʹʁ 1IPUPCZ+F[5JNNTPO6OTQMBTI
ͬͱ͘
putobject 2 putobject 3 opt_mult mid:*, argc:1 :"37 3VCZ7.
putobject 2 putobject 3 opt_mult mid:*, argc:1 :"37 3VCZ7. όΠτίʔυΛCʹมͯ͠
ίϯύΠϧͯ͠࡞ͨ͠ .soϑΝΠϧ
putobject 2 putobject 3 opt_mult mid:*, argc:1 :"37 3VCZ7. όΠτίʔυΛCʹมͯ͠
ίϯύΠϧͯ͠࡞ͨ͠ .soϑΝΠϧ
3VCZͷ+*5
ݺͼग़͠ճͷ ଟ͍ϝιουΛ +*5͢Δ
+*5ͯ͠ϦϯΫ ͢Δϝιου ʹ্ݶ͕͋Δ
3VCZͷ+*5
--jit-max-cache=num Max number of methods to be JIT-ed in a
cache (default: 1000) --jit-min-calls=num Number of calls to trigger JIT (for testing, default: 5)
3VCZQSFWJFX ͷ+*5
--jit-max-cache=num Max number of methods to be JIT-ed in a
cache (default: 100) --jit-min-calls=num Number of calls to trigger JIT (for testing, default: 10000)
3VCZ,BJHJͷ+*5ͷ ηογϣϯΛ:PV5VCFͰݟΑ͏