Aaron Sherman wrote:
On Mon, 2005-05-02 at 08:58 +0200, Leopold Toetsch wrote:

The vtable functions C<isa> and C<does>, which take now a string, are a
bit heavy-weighted and might get an extension in the log run that take
an integer flag.


Unless this happens, this would be a HUGE performance hit. After all,
Sv*OK is called all over the place in the Perl 5 code, including many
places where performance is an issue.

Here is some example P5 source from pp_pow in pp.c:

I presume that Ponie eventually will run Parrot opcodes. pp_pow() is like all these functions part of the perl runloop. Therefore it'll be


  infix .MMD_POW, P1, P2, P3

which will do a MM dispatch depending on (P1, P2). That's all. No flags needed.

If you're writing a compiler from scratch, I can see that being mostly
true. However, in trying to port Perl 5 guts over to Parrot, there's a
lot of code that relies on knowing what's going on (e.g. if a value has
ever been a number, etc.)

Most of the guts are called from the runloop. But there is of course XS code that messes with SV internals.


leo



Reply via email to