Ruby 2.6 JIT - Progress and Future

  • Performance
  • Portability
  • Stability
  • Security

Performance

Comparison:
while
trunk+JIT: 493.8 i/s
2.6.0-preview1+JIT: 246.4 i/s - 2.00x slower
2.6.0-preview1: 86.8 i/s - 5.69x slower
trunk: 86.2 i/s - 5.73x slower
2.5.0: 80.9 i/s - 6.11x slower
2.0.0: 78.4 i/s - 6.30x slower
Comparison:
Optcarrot Lan_Master.nes
2.6.0-preview3+JIT: 86.6 fps
2.6.0-preview2+JIT: 73.9 fps - 1.17x slower
2.6.0-preview1+JIT: 59.2 fps - 1.46x slower
2.6.0-preview3: 54.6 fps - 1.59x slower
2.6.0-preview2: 53.3 fps - 1.62x slower
2.6.0-preview1: 53.0 fps - 1.63x slower
2.5.3: 48.5 fps - 1.78x slower
2.0.0: 34.6 fps - 2.50x slower

Portability

  • GCC
  • Clang
  • Microsoft Visual C++

Stability

Security

  1. C compiler is replaced to an arbitrary binary
  2. C header files or libraries are replaced
  3. Another user’s program on the same server overwrites C code to be JIT-ed

Future

  • Inline Ruby methods as further as possible to avoid loading code or creating a VM frame many times
  • Optimize object allocations which we've not invested so much in JIT so far

--

--

--

Software engineer at Treasure Data. https://twitter.com/k0kubun https://github.com/k0kubun https://speakerdeck.com/k0kubun

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

An Overview on bilibili HMS Kits

Crocoblock Introduces JetEngine 2.9.0:

Crocoblock Introduces JetEngine 2.9.0: External Modules, Calculated Columns, Glossary Import, and Dynamic Function Improvements

About ACM UTD

Real-world Room migration strategies

AI in Web3

Five years with TypeScript

Don’t use Rails console sandbox in production

Elasticsearch and Big Data Jedi Order

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
k0kubun

k0kubun

Software engineer at Treasure Data. https://twitter.com/k0kubun https://github.com/k0kubun https://speakerdeck.com/k0kubun

More from Medium

Studies In Program Composition: A New Project — Golf

Does Your Favorite Programming Language Require a Semicolon? 💻

Cloning “Coursera.org” in 7 days

Using Dynamic Programming for Dyslexia — Automatic Spelling Mistakes Diagnosis