Aaron Sherman <[EMAIL PROTECTED]> 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. > Lazy construction is perhaps something Parrot should think about too, I can't imagine that lazy construction could be of any value. You have to construct it finally. Sum up the two parts. And 90% (or ~100 with gcc 3.3.3 on a Pentium) of Python's performance isn't that bad the more that Python AFAIK is constructing kind of a hash and we have a full fledged object. leo