Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
Improving TruffleRuby’s Startup Time with the SubstrateVM by Kevin Menard Ruby applications can be broadly split into two categories: those that run for a short period and those that stick around for a while. Optimizing performance for one often comes at the expense of the other. Over the years, alternative Ruby implementations have demonstrated remarkable performance gains for long-lived applications -- so-called peak performance -- but often lose out to MRI for short-lived applications. In this talk, I'll introduce the SubstrateVM and show how we use it to massively improve TruffleRuby's startup time with minimal impact on peak performance.
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
The video titled "Improving TruffleRuby’s Startup Time with the SubstrateVM" features Kevin Menard from Oracle Labs discussing the performance improvements in TruffleRuby, an alternative implementation of the Ruby programming language. The core focus of the talk is on how the SubstrateVM tool has significantly enhanced TruffleRuby's startup time while maintaining peak performance. ### Key Points Discussed: - **Introduction to TruffleRuby**: - TruffleRuby is designed for compatibility with Ruby code while leveraging existing code bases from JRuby, Rubinius, and MRI. - Achieves 99% compatibility with Ruby language specs and 97% with core library specs, working on functionality for database drivers. - **Performance Characteristics**: - Ruby applications can be characterized as short-lived or long-lived, with trade-offs in performance accordingly. TruffleRuby originally showed slower startup times compared to MRI (38ms for MRI vs. 1.7s for TruffleRuby). - The necessity of optimizing startup time for tools like developers' environments (IRB) and test suites is highlighted. - **Testing and Benchmarking**: - Multiple benchmarks were discussed, including the Ruby Spec Suite, where MRI completed tests in 1.5 seconds compared to TruffleRuby's 47.5 seconds. - The Optcarrot benchmark demonstrated TruffleRuby’s peak performance at 197 frames per second, compared to MRI’s 23 fps. - **Introduction of SubstrateVM**: - The SubstrateVM’s advantages stem from its ahead-of-time compilation capabilities and removal of JVM overhead. - The process involves compiling Java applications directly to native machine code, offering a static binary that reduces startup times. - **Improvements Achieved**: - After implementing the SubstrateVM, TruffleRuby's startup time for a "Hello, World!" benchmark decreased from 1.7 seconds to 100 milliseconds. - The test suite completion time improved from 47.5 seconds to under 7 seconds, demonstrating enhanced efficiency for developers. - **Trade-offs in Performance**: - While startup performance improved, a slight decrease occurred in peak performance, dropping from 197 fps to 169 fps in the Optcarrot benchmark. However, TruffleRuby remains significantly faster than MRI. - The presentation notes ongoing developments to mitigate any emerging performance hits as the Substrate VM evolves. ### Conclusions and Takeaways: - The improvements in startup time position TruffleRuby as a more viable option for short-lived Ruby applications. - The SubstrateVM tool is now publicly available, representing significant progress for TruffleRuby. - Continuous development goals focus on optimizing performance, memory consumption, and further integration of the Ruby standard library.
Suggest modifications
Cancel