[HN Gopher] How I developed a faster Ruby interpreter (2022)
___________________________________________________________________
How I developed a faster Ruby interpreter (2022)
Author : cyrc
Score : 70 points
Date : 2023-05-10 10:46 UTC (12 hours ago)
(HTM) web link (developers.redhat.com)
(TXT) w3m dump (developers.redhat.com)
| Conscat wrote:
| I got excited thinking there was a new article about MIR, but
| this is an old post.
| sparker72678 wrote:
| (2022)
| dang wrote:
| Added. Thanks!
| wiseowise wrote:
| > YJIT was initially written in C but was rewritten in Rust to
| simplify the porting of YJIT to new architectures.
|
| Curious. Why is that?
| Veliladon wrote:
| Shopify have a full rundown on it here:
|
| https://shopify.engineering/porting-yjit-ruby-compiler-to-ru...
| norman784 wrote:
| I don't remember exactly all the details, but the issue was
| something with developing for multiple platforms, with Rust you
| have traits, so it's easier to implement platform specific
| stuff with them, with C I don't know if there's anything
| similar, also you can think of all the other benefits that Rust
| brings.
|
| From my experience once you learn Rust, it is very easy to
| build things and being confident that if it compiles it works,
| I think C also scares a lot of developers and it's harder to
| collaborate, because each code review must be carefully review
| by having a mental model of the entire app, while in Rust
| obviously that's the job of the compiler.
| djbusby wrote:
| With C its macros and #define blocks. Not that fun.
| irq-1 wrote:
| Author is Vladimir Makarov creator of MIR: "a universal
| lightweight Just-in-Time (JIT) compiler known as MIR. The
| cornerstone of the project is a machine-independent medium-level
| intermediate representation (MIR)."
|
| https://github.com/vnmakarov/mir
|
| https://en.wikipedia.org/wiki/Intermediate_representation
___________________________________________________________________
(page generated 2023-05-10 23:01 UTC)