Ruby Video
Talks
Speakers
Events
Topics
Leaderboard
Sign in
Talks
Speakers
Events
Topics
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
RubyConf 2018 - Parallel programming in Ruby3 with Guild by Koichi Sasada Do you want to write the parallel program with Ruby? Ruby 3 will offer new concurrent abstraction: Guild (code name) which enable to run Ruby programs in parallel without difficulties. This presentation will share our current design of Guild and discussions. You can see how to write a parallel program with Guild with prototype implementation.
Date
Summary
Markdown supported
This presentation by Koichi Sasada at RubyConf 2018 introduces parallel programming in Ruby 3 through a new concurrency abstraction named Guild. The presentation begins with a brief overview of Ruby 2.6's performance improvements, including enhancements to method call speed and block passing efficiency, which set the stage for discussing the new features in Ruby 3. The most notable change is the introduction of the MJIT compiler and transient heap memory management, which addresses performance issues related to traditional memory allocation methods. Key points discussed include: - **Transient Heap**: A memory management technique that speedily allocates ephemeral memory, providing about 50% faster allocation and garbage collection for small objects while improving performance for array operations with four or more elements. - **Guild Overview**: Guild is designed to simplify concurrent programming in Ruby by eliminating mutable object sharing, thereby reducing the complexities and risks associated with thread safety. Guild allows multiple Guilds to operate concurrently on different threads, promoting productivity while leveraging multi-core architectures. - **Guild Design**: Each Guild can manage its own thread, prohibiting mutable object sharing to mitigate concurrency issues. This is achieved through shareable and non-shareable object distinctions, with immutable objects being easier to manage. - **Communication Between Guilds**: Efficient sharing of information is enabled through protocols that only transmit changes, optimizing performance, especially for large data structures and I/O-heavy operations. - **Demonstration of Performance**: The presenter showcased real-world applications, such as calculating Fibonacci numbers, demonstrating a performance improvement of up to 15 to 16 times when using Guild compared to traditional methods. A typical workload that takes three hours serially could be reduced to about 30 minutes using Guild. In conclusion, Sasada emphasizes ongoing efforts to refine Guild to ensure stable releases and enhance performance ahead of Ruby's 3.6 update. He welcomes feedback and contributions from the community to develop this promising concurrency model further. Though not covered in detail due to time constraints, discussions on the challenges of garbage collection and synchronization were noted as areas needing continued focus.
Suggest modifications
Cancel