Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Optimizations for Objects

Newsgroups: perl.perl6.internals
Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.stanford.edu!nntp.perl.org
Return-Path: <d...@sidhe.org>
Mailing-List: contact perl6-internals-h...@perl.org; run by ezmlm
Delivered-To: mailing list perl6-intern...@perl.org
Received: (qmail 58813 invoked by uid 76); 26 Mar 2004 17:22:18 -0000
Received: from x1.develooper.com (HELO x1.develooper.com) (63.251.223.170)
  by onion.perl.org (qpsmtpd/0.27.1) with SMTP; Fri, 26 Mar 2004 09:22:18 -0800
Received: (qmail 18062 invoked by uid 225); 26 Mar 2004 17:22:15 -0000
Delivered-To: perl6-intern...@perl.org
Received: (qmail 18051 invoked by alias); 26 Mar 2004 17:22:14 -0000
X-Spam-Status: No, hits=0.0 required=7.0
	tests=
X-Spam-Check-By: la.mx.develooper.com
Received: from 178.94.252.64.snet.net (HELO sprite.sidhe.org) (64.252.94.178)
  by la.mx.develooper.com (qpsmtpd/0.27.1) with SMTP; Fri, 26 Mar 2004 09:21:53 -0800
Received: (qmail 28248 invoked from network); 26 Mar 2004 17:36:38 -0000
X-Scanned-By: AMaViS-ng at sidhe.org
Received: from unknown (HELO ?172.24.18.98?) (d...@65.75.18.11)
  by 178.94.252.64.snet.net with SMTP; 26 Mar 2004 17:36:27 -0000
Mime-Version: 1.0
X-Sender: dan@localhost
Message-ID: <a06010215bc8a16abe3f5@[172.24.18.98]>
In-Reply-To: <200403261534.i2QFYxV18958@thu8.leo.home>
References: <a06010206bc7e29eca1e5@[10.0.1.2]>
 <200403171746.i2HHkon26793@thu8.leo.home>
 <a0601020abc7e427c63aa@[10.0.1.2]>
 <200403261534.i2QFYxV18958@thu8.leo.home>
Date: Fri, 26 Mar 2004 12:21:31 -0500
To: l...@toetsch.at
Subject: Re: Optimizations for Objects
Cc: perl6-intern...@perl.org
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
Approved: n...@nntp.perl.org
From: d...@sidhe.org (Dan Sugalski)

At 4:34 PM +0100 3/26/04, Leopold Toetsch wrote:
>Dan Sugalski <d...@sidhe.org> 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
d...@sidhe.org                         have teddy bears and even
                                       teddy bears get drunk