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とJIT
Search
na-o-ys
January 31, 2018
Programming
0
140
RubyとJIT
na-o-ys
January 31, 2018
Tweet
Share
More Decks by na-o-ys
See All by na-o-ys
IoTと監視
naoys
1
700
将棋盤を画像認識したかった
naoys
0
1.5k
Rust で乗り換え案内
naoys
0
610
疎行列と Jaccard 類似度の高速計算
naoys
1
550
有理数集合の濃度
naoys
2
110
YARVの最適化について調べた
naoys
0
110
転職会議サービスのAWS移行記録
naoys
0
50
Anonymous Recursion in C++
naoys
0
400
入門AlphaGo
naoys
5
3.7k
Other Decks in Programming
See All in Programming
C++でシェーダを書く
fadis
6
4.1k
Jakarta EE meets AI
ivargrimstad
0
320
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
530
どうして僕の作ったクラスが手続き型と言われなきゃいけないんですか
akikogoto
1
120
React への依存を最小にするフロントエンド設計
takonda
15
4k
みんなでプロポーザルを書いてみた
yuriko1211
0
280
Missing parts when designing and implementing Android UI
ericksli
0
170
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
960
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
2k
Tauriでネイティブアプリを作りたい
tsucchinoko
0
380
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
1.1k
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
310
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Designing Experiences People Love
moore
138
23k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
RailsConf 2023
tenderlove
29
900
We Have a Design System, Now What?
morganepeng
50
7.2k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Teambox: Starting and Learning
jrom
133
8.8k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Fireside Chat
paigeccino
34
3k
Navigating Team Friction
lara
183
14k
Transcript
Ruby, YARV, ͦͯ͠JIT 2018/01/29 @na_o_ys
࣌ḪΓ
Ruby 3x3 @RubyKaigi 2015 https://www.youtube.com/watch?v=E9bO1uqs4Oc
Evan Phoenix ʮJITͨ͠Β?ʯ @RubyKaigi 2015 • Evan Phoenix • Rubinius
ͷ࡞ऀ • Rubinius Ͱ LLVM Λར༻ͨ͠ JIT Λ࣮ࡁ Έͩͬͨ
ͦͯ͠ 2 ޙ, 2018/1ݱࡏ
͍͔ͭ͘ͷ JIT ϓϩδΣΫτ • MJIT • Vladimir Makarovࢯ • YARVΛ٫͠,
ϨδελϕʔεVMʹ • CίʔυΛಈతੜ͠, ࠷దԽ, ίϯύΠϧ • YARV-MJIT • k0kubunࢯ • YARV(ελοΫϕʔεVM)ͷ··, MJITͷJITػߏΛಋೖ
YARVͱ (͓͞Β͍) • Ruby 1.9.0 Ͱ࠾༻͞ΕͨRubyॲཧܥ • ߴԽΛୡ • https://speakerdeck.com/naoys/yarvfalsezui-
shi-hua-nituitediao-beta
MJIT
MJIT (1/2) • https://github.com/vnmakarov/ruby/tree/rtl_mjit_branch • YARV٫ • ελοΫϕʔεVMͷYARVΛࣺͯ, ϨδελϕʔεVMΛߏங •
Method JIT • ϝιου୯ҐͰͷJITίϯύΠϧ • CίʔυΛಈతੜ͠, ࠷దԽ & ίϯύΠϧ͢Δ
MJIT (2/2) • ͳͥϨδελϕʔεVM͔? • ୈҰʹ, ίʔυղੳͱ࠷దԽΛߦ͏ͨΊ • ελοΫϕʔε͜Εʹద͞ͳ͍ •
ୈೋʹ, ॲཧͷߴԽͷͨΊ • ελοΫϕʔεϝϞϦͷແବͳར༻͕ଟ͍ • ελοΫϕʔε໋ྩߦ͕ଟ͘ͳΔ
MJITͷਐḿ • RubyKaigi 2017 (2017/10) • http://gihyo.jp/news/report/01/rubykaigi2017/0003? page=2 • TL;DR
• Ruby 2 ͱൺ͔ͯͳΓͷߴԽ (ᐆດ) Λୡ • ʮ࣮ͱͯ͠ख़͢Δʹ͋ͱ1΄΅͔͔ΔͩΖ͏ʯ
YARV-MJIT
YARV-MJIT • MJITͷJITػߏͷҰ෦͚ͩΛಋೖ͢Δ • YARV͍ଓ͚Δ • ͶΒ͍ • 1. ϨδελϕʔεͷϝϦοτΛ໌֬Խ
• ελοΫϕʔεͩͱ࣮ࡍͲΕ͘Β͍͍ɾਏ͍ʁ • 2. MJITͷҠߦΛεϜʔζʹ͢Δ • JIT͕ೖΔλΠϛϯάͰ͍͖ͳΓYARV -> ϨδελϕʔεVMͷϦϓϨʔε ͕͓͖Δͷා͘ͳ͍ʁ
YARV-MJITͷਐḿ • https://github.com/ruby/ruby/pull/1782 • https://bugs.ruby-lang.org/issues/14235 • TL;DR • Ruby 2.6
Ͱग़͍ͨ͠ • -j, —jit ΦϓγϣϯͰ༗ޮɾແޮΓସ͑ΒΕΔ
·ͱΊ • RubyʹJIT͕ೖΔʂ • ͍·ͷͱ͜Ζͷະདྷ༧ਤ • ·ͣ͡Ίʹ, YARVΛҡ࣋ͨ͠··ͰJIT͕ೖΔ • Ruby
2.6 ʹͰʁ • ͍ͦͯۙ͠কདྷ, YARV͕Ϩδελϕʔεʹஔ͖͑ΒΕͨ ΑΓ͍JIT͕ೖΔ