为什么MRI是主流的Ruby解释器,而它表现最差?

时间:2022-11-30 20:45:13

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? 为什么MRI是主流的Ruby解释器,而它表现最差?

看过这个解释器比较图后,我想知道MRI主流使用背后的原因,尽管它表现最差。为什么不更频繁地使用Kiji或Ruby Enterprise Edition;缺乏宝石支持或其他什么?

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.

例如,Ruby Enterprise Edition是由一些最受欢迎的公司选择的,这归功于它的写时复制功能;我想知道是否有其他解释器实现它。

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.

REE可以轻松地与现有的Ruby解释器并行安装,允许您以最小的麻烦或风险切换到REE。 REE已经出现多年,已经被许多知名网站和组织使用,例如纽约时报,Twitter,Shopify和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.”

“我们切换到企业级ruby以获得[copy-on-write]内存特性的全部好处,我们绝对可以确认其他人报告的内存节省30%。即使按今天的硬件价格,也可以节省数千美元。“

3 个解决方案

#1


6  

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.

MRI是Matz的Ruby Interpreter的缩写。 Matz是Yukihiro Matsumoto的缩写,它是Ruby的发明者和主要作者的名字。这就是为什么它是主要的实现:它是原始的实现,所有其他的后来出现。 MRI仍然是参考,所有其他都需要与MRI兼容。但Matz试图使开发更加规范驱动而不是实现驱动的AFAIK。

#2


4  

Why aren't Kiji or Ruby Enterprise Edition used more frequently;

为什么不更频繁地使用Kiji或Ruby Enterprise Edition;

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.

你为什么假设他们不是?我们是Rails商店并在REE上托管我们的应用程序,我个人知道使用Rails的大多数其他公司也是如此。我们还为JRuby和Rubinius设立了分支机构,我们偶尔会为我们提供最终转换翻译的选项。

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:

使用MRI的一个原因是它是语言创建者本身的规范Ruby实现,这基本上是RubySpec出现之前唯一的“官方”语言规范:

http://www.rubyspec.org/

#3


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.

您提到的性能图测试了MRI版本。 1.8。基于YARV的当前“官方”Ruby实现1.9.2的速度更快,速度通常比Rubinius快,或者与JRuby相当。所以结论不再有效,尽管许多站点和其他部署都使用MRI 1.8,这对他们来说“足够快”。

#1


6  

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.

MRI是Matz的Ruby Interpreter的缩写。 Matz是Yukihiro Matsumoto的缩写,它是Ruby的发明者和主要作者的名字。这就是为什么它是主要的实现:它是原始的实现,所有其他的后来出现。 MRI仍然是参考,所有其他都需要与MRI兼容。但Matz试图使开发更加规范驱动而不是实现驱动的AFAIK。

#2


4  

Why aren't Kiji or Ruby Enterprise Edition used more frequently;

为什么不更频繁地使用Kiji或Ruby Enterprise Edition;

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.

你为什么假设他们不是?我们是Rails商店并在REE上托管我们的应用程序,我个人知道使用Rails的大多数其他公司也是如此。我们还为JRuby和Rubinius设立了分支机构,我们偶尔会为我们提供最终转换翻译的选项。

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:

使用MRI的一个原因是它是语言创建者本身的规范Ruby实现,这基本上是RubySpec出现之前唯一的“官方”语言规范:

http://www.rubyspec.org/

#3


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.

您提到的性能图测试了MRI版本。 1.8。基于YARV的当前“官方”Ruby实现1.9.2的速度更快,速度通常比Rubinius快,或者与JRuby相当。所以结论不再有效,尽管许多站点和其他部署都使用MRI 1.8,这对他们来说“足够快”。