Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
Array and Hash are used in every Ruby program, but current implementations either prevent to use them in parallel (MRI) or lack thread-safety guarantees (JRuby raises on concurrent Array#«). We show how to make Array and Hash thread-safe while allowing Ruby collections to scale up to tens of cores! By Benoit Daloze https://twitter.com/@eregontp Benoit Daloze is a PhD student in Linz, Austria, researching concurrency in Ruby with TruffleRuby for the past several years. He has contributed to many Ruby implementations, including TruffleRuby, MRI and JRuby. He is the maintainer of ruby/spec, a test suite for the behavior of the Ruby programming language. https://rubyonice.com/speakers/benoit_daloze
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
Benoit Daloze, a PhD student focused on concurrency in Ruby at Oracle Labs, presented at Ruby on Ice 2019 on the topic of "Parallel and Thread-Safe Ruby at High-Speed with TruffleRuby." This talk delves into making Ruby's core collections, Array and Hash, thread-safe while ensuring they can leverage the capabilities of modern multi-core processors. **Key Points Discussed:** - **Introduction to TruffleRuby:** - A high-performance Ruby implementation utilizing the Graal compiler. - Can run on the JVM or the substrate VM, offering interoperability especially with Java programs. - It provides quick startup times and smaller memory footprints compared to JVM. - **Performance Benchmarks:** - Benchmarking shows that TruffleRuby can achieve up to eight times the speed of Ruby 2.0, reaching up to 300 frames per second in specific tests. - Compared to standard Ruby implementations, performance improvements stem from optimized internal method calls and JIT compilation. - **Ruby 3x3 Project:** - Ruby aims to be three times faster than Ruby 2.0, which may be feasible with JIT compilation methods employed by TruffleRuby. - **Concurrency Challenges in Ruby:** - Traditional Ruby implementations use a global lock, limiting parallel execution across threads. - Daloze discussed how this model restricts scaling and throughput on modern hardware. - **Thread-Safety Enhancements:** - Focus on making Ruby collections concurrently safe through partial evaluation strategies and fine-grained locking mechanisms to minimize overhead. - Emphasizes the need for safe multi-threaded operations without degrading single-threaded performance. - **Applications in Frameworks:** - There are significant strides in ensuring integration with existing Ruby frameworks like Rails, particularly with C extensions. - **Conclusion:** - Daloze concludes that ongoing research and optimization techniques in TruffleRuby are paving the way for Ruby to compete with mainstream languages and fully utilize resources in modern hardware setups. Users can experiment with TruffleRuby as part of the GraalVM project, enhancing Ruby interactivity with other programming languages.
Suggest modifications
Cancel