Hacker News new | ask | show | jobs
by Alifatisk 299 days ago
I recall something similar statement and I think it was from the YJIT team, they suggested that more and more people write pure Ruby rather than using C extensions because the YJIT compiler cannot see C code, it's like a black box to it, so it cannot optimize it further. Which means that in practical examples, YJIT has been able to optimize pure Ruby code to the extent that it in some cases not only beat the C extension but also surpassed it

More Ruby code means more room for optimizations that the team can identify and add to the compiler

1 comments

if you want c extensions to get (de)optimized at runtime based on their usage patterns there is always ruby on graalvm from oracle.
You're thinking of TruffleRuby right? Yeah I have it bookmarked actually, it's performance is quite impressive