Re: [Python-Dev] Removing the block stack (was Re: PEP 343 and __with__)

2005-10-09 Thread Calvin Spealman
On 10/6/05, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > At 10:09 PM 10/5/2005 -0700, Neal Norwitz wrote: > >The general idea is to allocate the stack in one big hunk and just > >walk up/down it as functions are called/returned. This only means > >incrementing or decrementing pointers. This should

Re: [Python-Dev] Removing the block stack (was Re: PEP 343 and __with__)

2005-10-09 Thread Phillip J. Eby
At 01:33 PM 10/10/2005 +1300, Greg Ewing wrote: >Phillip J. Eby wrote: > > > Clearly, the cost of function calls in Python lies somewhere else, and I'd > > probably look next at parameter tuple allocation, > >For simple calls where there aren't any *args or other >such complications, it seems like

Re: [Python-Dev] Removing the block stack (was Re: PEP 343 and __with__)

2005-10-09 Thread Greg Ewing
Phillip J. Eby wrote: > Clearly, the cost of function calls in Python lies somewhere else, and I'd > probably look next at parameter tuple allocation, For simple calls where there aren't any *args or other such complications, it seems like it should be possible to just copy the args from the cal

Re: [Python-Dev] Removing the block stack (was Re: PEP 343 and __with__)

2005-10-06 Thread Martin v. Löwis
Neal Norwitz wrote: > My thoughts are to dynamically allocate the Python stack memory (e.g., > void *stack = malloc(128MB)). Then all calls within each thread uses > its own stack. So things would be pushed onto the stack like they are > currently, but we wouldn't need to do create a tuple to pas

Re: [Python-Dev] Removing the block stack (was Re: PEP 343 and __with__)

2005-10-06 Thread Phillip J. Eby
At 10:09 PM 10/5/2005 -0700, Neal Norwitz wrote: >I've also been thinking about avoiding tuple creation when calling >python functions. The change I have in mind would probably have to >wait until p3k, but could yield some speed ups. > >Warning: half baked idea follows. Yeah, I've been baking th

Re: [Python-Dev] Removing the block stack (was Re: PEP 343 and __with__)

2005-10-05 Thread Neal Norwitz
On 10/5/05, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > At 09:50 AM 10/4/2005 +0100, Michael Hudson wrote: > >(anyone still thinking about removing the block stack?). > > I'm not any more. My thought was that it would be good for performance, by > reducing the memory allocation overhead for frames

[Python-Dev] Removing the block stack (was Re: PEP 343 and __with__)

2005-10-05 Thread Phillip J. Eby
At 09:50 AM 10/4/2005 +0100, Michael Hudson wrote: >(anyone still thinking about removing the block stack?). I'm not any more. My thought was that it would be good for performance, by reducing the memory allocation overhead for frames enough to allow pymalloc to be used instead of the platform