Leopold Toetsch writes:
> $ time parrot -j -Oc c.imc
> in main
> 200000
> 
> real    0m1.069s
> user    0m0.910s
> sys     0m0.020s
> 
> $ time parrot -C ch.imc
> in main
> 200000
> 
> real    0m0.356s
> user    0m0.250s
> sys     0m0.000s
> 
> I think that a factor 3 improvement in function call speed (and a factor 
> of ~4 for overloaded vtables) is an argument to have a closer look at 
> this scheme. Here are again the key ideas:
> 
> * the interpreter structure is the context, and the continuation
> * instead of pushing registers onto the register frame stacks an
>   interpreter structure gets attached to each sub, and the
>   subsequent code is running with that interpreter

Yes, this scheme is definitely worth a look.  I'm currently battling
Perl 5's function call speed in my own projects; i.e.:

    for (1..4000) {
        # OpenGL calls
    }
    # Fast enough (30 FPS)

-----

    sub draw {
        # OpenGL calls
    }
    for (1..4000) {
        draw()
    }
    # Not fast enough (18 FPS)

This isn't something I want to have to battle.  When a language severely
limits my ability to abstract, I consider not using that language in
favor of something that doesn't punish me.  I really don't want to give
C++ preference to Perl 6.

Luke

Reply via email to