问题
Having seen this interpreter comparison graph, I wondered the reasons behind the MRI's mainstream usage, although it performs the worst. Why aren't Kiji or Ruby Enterprise Edition used more frequently; lack of gem support or something else?
For instance, Ruby Enterprise Edition is chosen by some of the most popular companies, thanks to its copy-on-write feature; I wonder if any other interpreter implements it.
REE can be easily installed in parallel to your existing Ruby interpreter, allowing you switch to REE with minimal hassle or risk. REE has been out for several years now and is already used by many high-profile websites and organizations, such as New York Times, Twitter, Shopify and 37signals.
“We switched to enterprise ruby to get the full benefit of the [copy-on-write] memory characteristics and we can absolutely confirm the memory savings of 30% some others have reported. This is many thousand dollars of savings even at today’s hardware prices.”
回答1:
MRI is short for Matz's Ruby Interpreter. Matz is short for Yukihiro Matsumoto which is the name of the inventor and main author of Ruby. And that's why it is the main implementation: it is the original implementation, all others appeared later. MRI is still the reference, all others need to be compatible with MRI. But Matz tries to make the development more specification-driven instead of implementation-driven, AFAIK.
回答2:
Why aren't Kiji or Ruby Enterprise Edition used more frequently;
Why are you assuming they aren't? We are a Rails shop and host our app on REE, as do most other companies I personally know that use Rails. We also have branches for JRuby and Rubinius which we occasionally rebase to leave us the option of eventually switching interpreter.
One reason for using MRI is that it's the canonical Ruby implementation by the language creator itself, which was basically the only "official" language specification before RubySpec came around:
http://www.rubyspec.org/
回答3:
Your mentioned performance graph tested the MRI ver. 1.8. The current "official" Ruby implementation 1.9.2 based on YARV is magnitude faster and generally faster then Rubinius or on par with JRuby. So the conclusions are no more valid, although many sites and other deployments use MRI 1.8 which is "fast enough" for them.
来源:https://stackoverflow.com/questions/6106907/why-is-mri-the-mainstream-ruby-interpreter-while-it-performs-the-worst