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
49
SLI/SLO をストリーム アラインドチームに導入した話
tsukasa_oishi
0
140
The Cacher in the Rye
tsukasa_oishi
1
5.7k
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
880
Other Decks in Technology
See All in Technology
The Role of Developer Relations in AI Product Success.
giftojabu1
0
110
フルカイテン株式会社 採用資料
fullkaiten
0
40k
B2B SaaS × AI機能開発 〜テナント分離のパターン解説〜 / B2B SaaS x AI function development - Explanation of tenant separation pattern
oztick139
2
170
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
310
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
140
AWS⼊社という選択肢、⾒えていますか
iwamot
2
1.1k
強いチームと開発生産性
onk
PRO
29
9.5k
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.8k
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
820
Terraform Stacks入門 #HashiTalks
msato
0
330
隣接領域をBeyondするFinatextのエンジニア組織設計 / beyond-engineering-areas
stajima
1
250
Featured
See All Featured
Become a Pro
speakerdeck
PRO
25
5k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
The Language of Interfaces
destraynor
154
24k
Statistics for Hackers
jakevdp
796
220k
Being A Developer After 40
akosma
86
590k
A designer walks into a library…
pauljervisheath
202
24k
Unsuck your backbone
ammeep
668
57k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
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ͰݟΑ͏