Question

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.

Was it helpful?

Solution

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/

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top