Is Ruby or other language going to run faster on Parrot?
Asked Answered
M

2

7

I just saw that there is a Ruby to Parrot compiler called Cardinal, which can create code to run on Parrot, which is a VM that can run byte-code. How is the performance of Ruby or any language compile to it and run there because for example, Ruby probably doesn't have pre-compiled byte code. Can it be faster running on Parrot? Python probably will be better off running as it is because it has .pyc.

Mendelism answered 23/10, 2010 at 2:40 Comment(1)
JRuby is taking the same approach, compiling Ruby to Java bytecode.Lassalle
F
4

Parrot development hasn't focused on optimisation yet. The roadmap always listed this at version 3 or 4 (Parrot is currently at version 2.9).

A big refactor branch which includes ripping out the JIT and replacing it with a new one is currently happening (refs: Lorito & JITRewrite).

The fruits of this should start showing as part of Parrot 3.0 which I think is due next spring.


Update

A likely roadmap has been posted by a Parrot Developer in his blog. Here is a summary of what he thinks the next 3 years maybe:

  • 3.0 - New Garbage Collector
  • 3.3 - Lorito prototype
  • 4.0 - New object metamodel
  • 5.0 - New JIT
  • 6.0 - New concurrency system

/I3az/

Figurine answered 23/10, 2010 at 12:8 Comment(0)
A
1

Edit: I was looking at older results when newer ones are available. As of the most current benchmarks, which are still quite old, parrot beats the vanilla vm on a few tests, but is slower on others. A few tests it's not even able to complete.

yarv is the hands-down speed king for ruby performance.

Assentor answered 23/10, 2010 at 3:21 Comment(2)
"New" results are from 2007? :-/Campfire
I will admit that it leaves room for improvement.Assentor

© 2022 - 2024 — McMap. All rights reserved.