什么阻止Ruby,Python来获得Javascript V8的速度? [英] What blocks Ruby, Python to get Javascript V8 speed?

查看:139
本文介绍了什么阻止Ruby,Python来获得Javascript V8的速度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否存在阻止优化实施的Ruby / Python功能(例如内联缓存)V8引擎有哪些?



Python由Google员工共同开发,因此不应被软件专利阻止。



或者这是Google为V8项目投入资源的问题。

解决方案


什么阻止Ruby,Python才能获得Javascript V8速度?


没什么。



好吧,好吧:钱。 (和时间,人,资源,但如果你有钱,你可以购买。)



V8拥有一支才华横溢,高度专业化,经验丰富的团队(因此,在为动态OO语言创建高性能执行引擎方面,有数十年的经验(我正在单独谈论–总体来说,它更像是几个世纪)。他们基本上也是同样创建Sun HotSpot JVM的人(以及其他许多人)。



首席开发人员Lars Bak已经在虚拟机上工作了25年(并且所有这些虚拟机都已经达到V8),这基本上是他的整个(职业)生活。一些编写Ruby VM的人甚至还不到25年。


是否存在阻止优化实现的Ruby / Python功能(例如内联缓存)V8引擎有?


鉴于至少IronRuby,JRuby,MagLev,MacRuby和Rubinius都有单形(IronRuby) )或多态内联缓存,答案显然是否定的。



现代Ruby实现已经做了大量的优化。例如,对于某些操作,Rubinius的 Hash 类比YARV快。现在,除非你意识到Rubinius的 Hash 类是在100%纯Ruby中实现的,而且YARV是在100%手动优化的C中实现的,所以这听起来并不令人兴奋。 / p>

因此,至少在某些情况下,Rubinius可以生成比GCC更好的代码!


<或者这是Google为V8项目投入资源的问题。


是的。不只是谷歌。 V8的源代码现已有25年历史了。正在开发V8的人们还创建了自我虚拟机(迄今为止创建的最快的动态OO语言执行引擎之一),Animorphic Smalltalk虚拟机(迄今为止创建的最快的Smalltalk执行引擎之一),HotSpot JVM(有史以来最快的JVM,可能是最快的VM时期)和OOVM(有史以来最有效的Smalltalk VM之一)。



事实上,Lars Bak, V8的首席开发人员,在的每一个上工作,加上其他几个。


Are there any Ruby / Python features that are blocking implementation of optimizations (e.g. inline caching) V8 engine has?

Python is co-developed by Google guys so it shouldn't be blocked by software patents.

Or this is rather matter of resources put into the V8 project by Google.

解决方案

What blocks Ruby, Python to get Javascript V8 speed?

Nothing.

Well, okay: money. (And time, people, resources, but if you have money, you can buy those.)

V8 has a team of brilliant, highly-specialized, highly-experienced (and thus highly-paid) engineers working on it, that have decades of experience (I'm talking individually – collectively it's more like centuries) in creating high-performance execution engines for dynamic OO languages. They are basically the same people who also created the Sun HotSpot JVM (among many others).

Lars Bak, the lead developer, has been literally working on VMs for 25 years (and all of those VMs have lead up to V8), which is basically his entire (professional) life. Some of the people writing Ruby VMs aren't even 25 years old.

Are there any Ruby / Python features that are blocking implementation of optimizations (e.g. inline caching) V8 engine has?

Given that at least IronRuby, JRuby, MagLev, MacRuby and Rubinius have either monomorphic (IronRuby) or polymorphic inline caching, the answer is obviously no.

Modern Ruby implementations already do a great deal of optimizations. For example, for certain operations, Rubinius's Hash class is faster than YARV's. Now, this doesn't sound terribly exciting until you realize that Rubinius's Hash class is implemented in 100% pure Ruby, while YARV's is implemented in 100% hand-optimized C.

So, at least in some cases, Rubinius can generate better code than GCC!

Or this is rather matter of resources put into the V8 project by Google.

Yes. Not just Google. The lineage of V8's source code is 25 years old now. The people who are working on V8 also created the Self VM (to this day one of the fastest dynamic OO language execution engines ever created), the Animorphic Smalltalk VM (to this day one of the fastest Smalltalk execution engines ever created), the HotSpot JVM (the fastest JVM ever created, probably the fastest VM period) and OOVM (one of the most efficient Smalltalk VMs ever created).

In fact, Lars Bak, the lead developer of V8, worked on every single one of those, plus a few others.

这篇关于什么阻止Ruby,Python来获得Javascript V8的速度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆