Skip to content
0:00 / 0:00

#truffleruby#cextensions#graalvm

RubyConf 2016 - Ruby’s C Extension Problem and How We're Solving It by Chris Seaton

Confreaks

42K subscribers • 74 videos on Hallway • Conference channel

YouTube
  • Recommended by 1 person: 1 on Stack Overflow and its sister sites.
  • Presented by Chris Seaton, Creator of TruffleRuby

Advanced. Deep dive for people who know the field.

2K views9 years ago1 recommendation

Programming languagesSystems programmingRubyCompilers and interpretersPerformance and optimization

Chris Seaton discusses the challenges of supporting Ruby C extensions in alternative implementations and how TruffleRuby interprets C code.

RubyConf 2016 - Ruby’s C Extension Problem and How We're Solving It by Chris Seaton Ruby’s C extensions have so far been the best way to improve the performance of Ruby code. Ironically, they are now holding performance back, because they expose the internals of Ruby and mean we aren’t free to make major changes to how Ruby works. In JRuby+Truffle we have a radical solution to this problem – we’re going to interpret the source code of your C extensions, like how Ruby interprets Ruby code. Combined with a JIT this lets us optimise Ruby but keep support for C extensions.

Why it's here

1 person recommends this

What people say. Recommended for understanding why C extensions are difficult to support in alternative Ruby runtimes like TruffleRuby.

Moments people linked to

Chris Seatonon Stack Overflow • Recommends

On “Why does truffleruby need C extensions?”

Running C extensions is hard because the C extension API is just the entire internals of MRI exposed as a header file. You aren't programming against a clean API - you're programming against all the implementation details and internal design decisions of MRI. JRuby's Java extensions have exactly the same problem! The JRuby Java extension API is just the entire internals of JRuby, and you aren't programming against an API, instead you're programming against all the implementations details and design decisions of JRuby. We plan to eventually tackle both problems in the same way - which is to add another level of abstraction over the C or Java code using an interpreter which we can intercep…
14View the answer