![Page 1: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/1.jpg)
1
YARV: Yet Another RubyVM
… on Rails? 2006 10/22
RubyConf 2006 @ Denver
SASADA KoichiNihon Ruby no Kai
The University of Tokyo
![Page 2: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/2.jpg)
2
Caution! (re-review) I can’t speak English well
• If I say strange English, you can see the slide page• Or ask another Japanese. They can speak English
well.• If you have any question, ask me with:
•Japanese (recommended)•Ruby, C, Scheme, Java, …, Python, Haskell,
...• IRC (@freenode#rubyconf)•Easy English (less than 10 words with easy
words)
![Page 3: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/3.jpg)
3
Agenda Purpose
• To show A Rail from YARV to Ruby Agenda
• Self Introduction (third)• YARV Progress Report
• YARV Internal Briefly• YARV Features
• A Rail from YARV to Rite or Ruby 1.9.1• Conclusion
![Page 4: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/4.jpg)
4
自己紹介Self Introduction
…Japanese must use the Takahashi Method
![Page 5: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/5.jpg)
5
Self Introduction SASADA (family) Koichi (given)
• 笹田 → SASADA, 耕一 → Koichi Japanese use some patterns to represent
own name in English• “#{given.capitalize} #{family.capitalize}”
• Koichi Sasada• “#{given.capitalize} #{family.upper}”
• Koichi SASADA• “#{family.upper} #{given.capitalize}”
• SASADA Koichi (my favorite)
![Page 6: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/6.jpg)
6
Self Introduction (cont.) A member of Nihon-Ruby-no-Kai
• Rubyist Magazine•Webzine about Ruby in Japanese•Vol. 16, 2006•Got second anniversary
• RubyKaigi 2006•First time Ruby event in Japan
![Page 7: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/7.jpg)
7
RubyKaigi 2006
Held in Japan, Tokyo Two keynote speakers
• Matz• DHH
200 tickets are sold out in 3 hours
![Page 8: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/8.jpg)
8
RubyKaigi 2007 2007 6/9 (Sat), 6/10 (Sun) Tokyo, Japan Official Language are Japanese & Ruby Two keynote speakers
• Dave Thomas• Matz
We’ll announce about it next year. We’ll wait for your attendance
![Page 9: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/9.jpg)
9
Self Introduction (cont.)
Rubyist Magazine• http://jp.rubyist.net/magazine/
![Page 10: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/10.jpg)
10
Self Introduction (cont.)
A member of Nihon Perl-no-Kai• Perl Association in Japan• 2006 1st Apr.• Perlish Magazine
•Webzine about Perl in Japanese•http://jp.rubyist.net/PerlMa/
• No PerlKaigi
![Page 11: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/11.jpg)
11
閑話休題Back to the YARV Presentation
![Page 12: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/12.jpg)
12
DEMO
![Page 13: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/13.jpg)
13
Glossary Rite: Code name of Ruby 2.0
• a.k.a. vaporware name (vs. Parrot)• First day to appear is in 2001-03-28
•vs. Parrot: 2001-04-01→ … Rite > Parrot ?(level of vaporware)→ … Rite will be fast than Parrot
YARV: Yet Another RubyVM• First day to appear is 2004-01-01
![Page 14: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/14.jpg)
14
Ruby Virtual MachineYARV: Yet Another RubyVM
Supported by funds• By IPA, Japan (Finished)
Virtual Machine• Simple Stack Machine• Specific VM Instructions (YARV Instructions)• Compiler• Interpreter (VM)• Many Optimization techniques to improve performance
Open Source Software• http://www.atdot.net/yarv/
![Page 15: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/15.jpg)
15
Overview of YARVRuby Program
Compiler
YARV Insn. Seq.
VM (Execution)with Many Opt.
JIT Compiler
AOT Compiler
C Program
C Compiler
Ext. Library
Assembler
YARV
![Page 16: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/16.jpg)
16
Optimizations for performance Compile time optimization Direct threaded code Specialized instructions Operands/Instructions Unifications Inline (Method) cache Static stack caching Profiler And more…
![Page 17: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/17.jpg)
17
![Page 18: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/18.jpg)
18
進捗報告YARV Progress Report
![Page 19: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/19.jpg)
19
Progress Report YARV can build with configure/make
• Also work on Windows• Doesn’t work with Autoconf 2.6.0
• … Do you know reason? YARV passes most of tests
• But “make test/test-all” claimed some errors because of detail spec. mismatch
YARV can run most of Ruby Programs/Libraries
![Page 20: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/20.jpg)
20
DEMOUsing YARV
![Page 21: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/21.jpg)
21
機能紹介Introduction YARV Features
![Page 22: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/22.jpg)
22
YARV FeatureYARV’s MYTH
YARV has some MYTH like
YARV is GREAT! and
YARV will solve ALL Problems!
![Page 23: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/23.jpg)
23
YARV FeatureYARV’s MYTH (cont.)
YARV make fast all Ruby Program
by 50 times
![Page 24: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/24.jpg)
24
YARV FeatureYARV’s MYTH (cont.)
YARV solve problem
CHARACTER CODE Problem!
YARV puts down frame WAR!
![Page 25: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/25.jpg)
25
YARV FeatureYARV’s MYTH (cont.)
YARV make you RICH! YARV make you SLIM! YARV finds my
GIRL FRIEND!
![Page 26: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/26.jpg)
26
YARV FeatureYARV’s MYTH (cont.)
BAD JOKEYARV is not Silver Bullet
![Page 27: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/27.jpg)
27
YARV FeaturesBASIC
Running Ruby Programs• … That’s for sure• … Can’t run Perl program
![Page 28: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/28.jpg)
28
YARV FeaturesPerformance Improvement
GOT IMPROVE• VM Bottleneck Programs• Numerical Programs• Symbolic Processing
![Page 29: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/29.jpg)
29
YARV FeaturesPerformance Improvement (cont.)
x20 Faster
Fast
![Page 30: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/30.jpg)
30
YARV FeaturesPerformance Improvement (cont.)
DOES NOT IMPROVE• NOT VM Bottleneck programs• String/Text Processing• Program which allocate huge Objects•…
![Page 31: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/31.jpg)
31
YARV FeaturesPerformance Improvement (cont.)
No speed-up.VM is not bottleneck.
Regexp
BignumObject
allocation
Build Exception object
![Page 32: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/32.jpg)
32
YARV FeaturesPerformance Improvement (cont.)
![Page 33: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/33.jpg)
33
YARV FeaturesInstruction Sequence
Assemble• You can assemble YARV iseq
Disassemble• You can see disassemble results of Ruby
Scripts Serialize and De-Serialize YARVCore::VM::InstructionSequence
• Class name will be changed
![Page 34: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/34.jpg)
34
YARV FeaturesInstruction Sequence (cont.)
Ruby Program
Compiler
YARV Insn. Seq.
VM (Execution)with Many Opt.
YARVEasy
Representation
Can Represent
with Ruby Literal
YAML Marshalled
![Page 35: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/35.jpg)
35
並列処理Parallel Processing on YARV
![Page 36: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/36.jpg)
36
YARV Thread System
A Ruby Thread (RT) is mapped with A Native Thread (NT)• Supporting POSIX Thread or
Windows Thread
![Page 37: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/37.jpg)
37
Overview of YARV Thread systemRuby (YARV)
Native ThreadSystem S/W
Processor(s)PE PE PE・・・
H/W
KL(OS)
UL
RT RT RT
NT NT NT
Thread SchedulerS/W
PE: Processor Element, UL: User Level, KL: Kernel Level
・・・
・・・
![Page 38: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/38.jpg)
38
Current Ruby Thread Model(Thread model 1)
No Parallel Execution No need to synchronize each thread
in C code → So much C Libraries need to add synchronization
CPU 1
CPU 2IDLE
NT1
RT 1 RT 2 RT 1
vs. Java
![Page 39: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/39.jpg)
39
Thread model like Python(Thread model 2) Using Native thread for each Ruby
Thread Make a Giant Lock (GL) Only a thread which has GL can run No need to add sync. codes,
but can’t run in parallelCPU 1
CPU 2
NT1
RT 1
RT 2
NT2
GL as RightGL as Right
![Page 40: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/40.jpg)
40
Parallel Execution with GL(Thread model 3)
Ruby Threads in Parallel When invoking non-thread safe code,
VM gets GL
CPU 1
CPU 2
NT1
RT 1
RT 2
NT2GL
GL: Giant Lock
GL
![Page 41: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/41.jpg)
41
Machine level Call Graph: top VM_eval_func (Ruby Method(s)) notTS C Method VM_eval_func (Ruby Method(s)) TS C Method notTS C Method
Giant Lock Management
Locked w/GL
Locked w/GLJump by exception Method Call
![Page 42: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/42.jpg)
42
Parallel YARV EvaluationGL Conflicts
Bad ScalabilityGood
Scalability
![Page 43: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/43.jpg)
43
YARV Thread Specification(limitation)
Mutex class will be built-in Thread.critical will be vanished
• Not be obsolete, but be unsupported
![Page 44: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/44.jpg)
44
公式処理系への道
A Rail to Official Ruby Interpreter
![Page 45: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/45.jpg)
45
The Rail from YARV to Rite
“Matz said” that he will release Ruby 1.9.1 on 2007 Christmas
Ruby 1.9.1 merged with YARV Merged with official and YARV in
2007/Spring? Summer?
![Page 46: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/46.jpg)
46
The Rail from YARV to RiteSpecification
Thread model will be model 2• No parallel execution• Easy to write C Extension Libraries
•No synchronization code
![Page 47: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/47.jpg)
47
開発体制YARV Development System
![Page 48: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/48.jpg)
48
YARV Development
Developers• SASADA Koichi ... only one?• Matz has an account to access
YARV repository•He is busy to play with Current Ruby
and Ruby Spec. Test codes are very welcome!
![Page 49: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/49.jpg)
49
YARV Development (cont.)
Mailing List as BTS• Register Bug entry with ML post
• “Subject: [BUG]> foobar” or • “Subject: open> foobar”
• You can see registered bug entries at http://www.atdot.net/~ko1/yarvbugs/
![Page 50: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/50.jpg)
50
YARV Development (cont.) IRC
• Freenode#yarv is official English channel but I’m always away…
Autobuild/Autotest• http://i.loveruby.net/autobuild/yarv/• By AOKI san
You can find YARV Information on http://www.atdot.net/yarv/
![Page 51: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/51.jpg)
51
まとめConclusion
![Page 52: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/52.jpg)
52
Conclusion Ruby will be Akiba-kei language YARV can build with “make” and can install
with “make install” YARV can run most of Ruby Apps. YARV will be merged with 1.9.1 (2007
Christmas, if you trust Matz) YARV needs more developers or testers!
![Page 53: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/53.jpg)
53
Conclusion: Future Work
YARV lacks some big staffs• Hook interface (set_trace_func) or
debugging, profiling interface• Cache up Current Ruby 1.9
JIT/AOT Compiler• AOT compiler is already implemented
(but incomplete)
![Page 54: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/54.jpg)
54
Additional Project High-Performance Ruby
• One of my research• Try to realize High-Performance
Computation in Ruby•GOAL: Easy to write HPC code
vs. x10, Fortless, Chapel, … I want to show it next year with
Ruby 1.9.1
![Page 56: YARV: Yet Another RubyVM on Rails? › yarv › rc2006_sasada_yarv_on_rails.pdf · 1 YARV: Yet Another RubyVM on Rails? 2006 10/22 RubyConf 2006 @ Denver SASADA Koichi Nihon Ruby](https://reader036.vdocuments.us/reader036/viewer/2022063001/5f1b597cffd3f7753540f86f/html5/thumbnails/56.jpg)
56