Gradual Write-Barrier Insertion into a Ruby Interpreter
Ruby is a popular object-oriented programming language, and the performance of the Ruby garbage collector (GC) directly affects the execution time of Ruby programs.
Ruby 2.0 and earlier versions employed an inefficient non-generational conservative mark-and-sweep GC.
To improve this and make it a generational collector, it is necessary to introduce write barriers (WBs), but this requires huge modification to existing source code, including third-party C-extensions.
To avoid the need for adding WBs around legacy code, we invented a new concept called ``WB-unprotected objects'', which indicates to the GC to treat such objects more conservatively.
By leveraging this design, we were able to improve the performance of Ruby 2.1 with a generational GC and of Ruby 2.2 with an incremental GC while preserving compatibility with existing C-extensions.
Another significant advantage of this approach is that WBs can be added gradually, which reduces the difficulties associated with updating existing code.
Koichi Sasada is a programmer, mainly developing Ruby interpreter (CRuby/MRI). He received Ph.D (Information Science and Technology) from the University of Tokyo, 2007. He became a faculty of University of Tokyo (Assistant associate 2006-2008, Assistant professor 2008-2012). After the 13 years life in university, he had joined a member of Matz’s team in Heroku, Inc. Now he is a member of Cookpad Inc (engineer). He is also a director of Ruby Association.
Sun 23 Jun
|16:00 - 16:25|
Paul Lietar, Theodore ButlerDrexel University, USA, Sylvan ClebschImperial College London, Sophia DrossopoulouImperial College London, Juliana FrancoMicrosoft Research, Cambridge, Matthew ParkinsonMicrosoft Research, UK, Alex ShamisMicrosoft Research / Imperial College London, Christoph M. WintersteigerMicrosoft Research, UK, David ChisnallUniversity of Cambridge
|16:25 - 16:50|
Steve BlackburnAustralian National University
|16:50 - 17:14|
Koichi SasadaCookpad, JapanLink to publication DOI
|17:14 - 17:15|