This talk will discuss the representation of objects in dynamically-typed languages like Ruby. Fr...
This talk will discuss the representation of objects in dynamically-typed languages like Ruby. From the naive hash table used in ruby 1.8.7 to the highly optimized and type-specialized representation, we will take a look at a few common representations for objects with a dynamic number of fields. Advantages and drawbacks will be discussed and in particular the behavior of objects accessed concurrently. Would you expect instance variables to disappear? Or that writing to them would have no effect? If not, come and see why it could happen, and what can be done to fix it and at what cost!
JRuby+Truffle is a high performance implementation of Ruby being built as an open-source project at Oracle Labs. It uses state-of-the-art research techniques for writing interpreters and dynamic compilers that allows it to be both significantly faster and simpler than any other implementation of Ruby. It is built on top the of Truffle framework which provide an Object Storage Model. We present a solution to make it behave correctly under concurrent access.