Thies C. Arntzen wrote:
[ most already answered, just some additional bits ]


because pmc as so much slower that native types i loose most of parrots brilliant speed due to the fact that i don't know the types at compile-time.

When you get rid of all the temps and the clone[1], the loop with PMCs runs at about 3 times the speed of perl5. So I'd not use the term "slow". It would be faster with native types of course, but its hard to impossible to decide at compile time, that native types do the same thing. I don't know PHP but in perl the + operator could be overloaded and calculate the phase of the moon instead of adding 5.5 ...



union {

Yeah, that's a PMC.


... could you explain how you are planning to
make untyped languages run really fast on parrot and what direction i have
to take to use that technique?

AFAIK you have to work hard on your code generator. We will try to optimize a lot, but at the AST level you have much more information and can safely do it better.



thies

leo


[1]
# for ($i = 0; $i < 10_000_000; $i = $i + 5.5) { }
.sub _main
    .sym var i
    i = new PerlUndef
    i = 0
    $P0 = new PerlUndef
    $P0 = 10000000
lp:
    if i >= $P0 goto ex
    i = i + 5.5
    goto lp
ex:
    end
.end



Reply via email to