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 OO benches
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dan Sugalski  
View profile  
 More options Apr 19 2004, 10:48 am
Newsgroups: perl.perl6.internals
From: d...@sidhe.org (Dan Sugalski)
Date: Mon, 19 Apr 2004 09:45:50 -0400
Local: Mon, Apr 19 2004 9:45 am
Subject: Re: OO benches
At 11:19 AM +0100 4/17/04, Piers Cawley wrote:

>Leopold Toetsch <l...@toetsch.at> writes:

>>  Aaron Sherman <a...@ajs.com> wrote:
>>>  On Fri, 2004-04-16 at 18:18, Leopold Toetsch wrote:

>>>  Sorry, I gave the wrong impression. I meant it looks suspiciously like
>>>  Python is doing a lazy construction on those objects, not that there is
>>>  anything wrong with the benchmark.

>>  No, I don't think that this is happening. Parrot's slightly slower
>>  object instantiation is due to register preserving mainly. The "__init"
>>  code is run from inside the "new PObj, IClass" opcode. As its not known
>>  that a method call is happening here, we can't use register preserving
>>  operations that only save needed registers--we have to save all
>>  registers. These two memcpys are the most heavy part of the operation.

>Maybe we should rethink that then and make allocation and
>initialization two different phases.

That's the way I'm leaning. I know it's a *bad* idea from a
high-level language point of view, but from the lower levels it's
less of a bad idea.

New, then, would allocate the object and you'd need to then call its
constructor, with the constructor call using full-on parrot calling
conventions and giving the calling code a chance to save the
registers it was interested in. Of course, then we get into the issue
of handling return values from multiple calls into methods as we
automatically redispatch the constructor, but...
--
                                         Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
d...@sidhe.org                         have teddy bears and even
                                       teddy bears get drunk


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.