develooper Front page | perl.perl6.internals | Postings from February 2002

RE: I'm amazed - Is this true :")

From:
Hong Zhang
Date:
February 4, 2002 11:46
Subject:
RE: I'm amazed - Is this true :")
Message ID:
400CE9390E334A4393CEECDD6863120A01A1077D@ussccm003.corp.palm.com
> mops tests :
> 
> on perl5,python I get - 2.38 M/ops
> ruby ~ 1.9 M/ops
> ps ~ 1.5 M/ops
> 
> parrot - 20.8 M/s
> parrot jitted - 341 M/ops and it finish in half second ... for most of
> the other I have to wait more that a minute ..

Frankly speaking, this number is misleading. I know the python and ruby
interpreter. They count "a + b" as 3 mops, load a, load b, and add top
two values of stack. The a and b can be any type, so type check, coersion,
vtable dispatch overhead are necessary. It is equivalent to add to PMCs
and produce a third PMC. The Parrot op does not map directly to language
constructs, it is more like Java virtual machine, where operand types
are known. Some time, compiler can compile code directly into Parrot
opcode, when the type information is avaible. Most of time, we have to
use generic PMC and vtable. The difference between Perl 5 opcode and
Perl 6 opcode + vtable would be much smaller.

Hong



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About