At 4:34 PM +0100 3/26/04, Leopold Toetsch wrote:
Dan Sugalski <[EMAIL PROTECTED]> wrote:
At 6:46 PM +0100 3/17/04, Leopold Toetsch wrote:

Or: after the 1st delegate lookup create a JITed stub

Which is swell, except for that pesky can't-guarantee-a-JIT thing... :)

I've running that now for the C<__init> call. In the absence of C<__init> the vtable function is replaced by C<ret>. When C<__init> is present a JITed function stub gets called that calls the PASM w/o method lookup.

Speedup for missing C<__init> is 100%[1], with C<__init> around 10% [2]

It doesn't work for superclasses' C<__init> yet though.

Is it more "swell" or "pesky"?

Depends on whether it requires the JIT or not. :)


FWIW, I figure the way to do this fast is to have two extra slots in the class object, one for constructors and one for destructors. The class can fill 'em in at construct time, and the object constructor/destructor stuff can just walk through the list. Saves us the hassle of doing all the lookups at runtime.
--
Dan


--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to