Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Elian (119)

Elian
  (email not shown publicly)
http://www.sidhe.org/~dan/
AOL IM: DanSugalski (Add Buddy, Send Message)

Perl 6/Parrot internals ex-design team lead.

Journal of Elian (119)

Tuesday March 12, 2002
03:07 PM

It's nice to be surprised some days

[ #3465 ]

I'm giving a parrot status talk at the Boston perlmongers meeting wednesday, and trying to do the meet 'n greet at BioITWorld in Boston wednesday and thursday, so I figured having some benchmark numbers would be a good idea.

Now, with parrot I've been shooting for an overall 20% faster than perl 5. Nothing fancy, nothing revolutionary, just a good solid chunk better. 20% faster seems achievable, and I'd consider it a success if we did that. 30% faster and I'd be thrilled. So I ran our MOPS benchmark.

MOPS is a stupid benchmark--all it does is count from 1 to 100 Million. It was originally designed to do really simple things so we could judge opcode dispatch speed. We've versions for a bunch of languages. We've even got a postscript version.

Running this for perl takes 479 seconds. Not bad--we are going to 100 million after all. (This is on my old 300MHz Celeron box)

I take a shot at running it for parrot. We've three versions of it, just because. The trivial version, with the JIT enabled, takes all of 2 seconds to run, but that's hardly a fair comparison with perl, as it's all integer math. (Real machine ints no less, not even integer PMCs)

Running the truly equivalent version takes... 125 seconds.

But that's not all. Parrot, by default, builds with -g and no -O of any kind. (We are, after all, pre-alpha) Just for chuckles, I rebuild it with -O3 (which turns on pretty much all of GCC's optimizations)

With -O3? The run takes 103 seconds. Almost 20% faster than the original, and more than 4.5 times faster than perl 5.

Add in a trivial optimization (adding the integer constant one, not a variable with the value 1) and the run drops down to 80 seconds.

I think I'm not going to worry quite so much about hitting my 20% faster mark. :)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.