[Python-Dev] Store x Load x --> DupStore
mwh at python.net
Mon Feb 21 10:00:11 CET 2005
Michael Hudson <mwh at python.net> writes:
>> Because there are CO_MAXBLOCKS * 12 bytes in there for the block
>> stack. If there was no need for that, frames could perhaps be
>> allocated via pymalloc. They only have around 100 bytes or so in
>> them, apart from the blockstack and locals/value stack.
> What I'm trying is allocating the blockstack separately and see if two
> pymallocs are cheaper than one malloc.
This makes no difference at all, of course -- once timeit or pystone
gets going the code path that actually allocates a new frame as
opposed to popping one off the free list simply never gets executed.
(and despite what the sigmonster implies, I wasn't drunk last night :)
This is an off-the-top-of-the-head-and-not-quite-sober suggestion,
so is probably technically laughable. I'll see how embarassed I
feel tomorrow morning. -- Patrick Gosling, ucam.comp.misc
More information about the Python-Dev