develooper Front page | perl.perl6.internals | Postings from July 2002

Re: Stack performance issue

Thread Previous
Dan Sugalski
July 1, 2002 10:27
Re: Stack performance issue
Message ID:
At 6:59 PM +0100 6/30/02, Tom Hughes wrote:
>There is a performance issue in the stack code, which the attached
>patch attempts to address.


>Some figures from my test programs, running on a K6-200 linux box. The
>test programs push and pop 65536 times with the first column being when
>that loop doesn't cross a chunk boundary and the second being when it
>does cross a chunk boundary:
>                                   No overflow     Overflow
>   Integer stack, before patch      0.065505s     16.589480s
>   Integer stack, after patch       0.062732s      0.068460s
>   Generic stack, before patch      0.161202s      5.475367s
>   Generic stack, after patch       0.166938s      0.168390s

Yowtch! Go for it, though please make some comments in the code to 
the effect that the pointer to the next (unused) chunk should be 
invalidated if things get marked COW.

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai                         have teddy bears and even
                                       teddy bears get drunk

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About