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

Re: Stack performance issue

Thread Previous
From:
Dan Sugalski
Date:
July 1, 2002 10:27
Subject:
Re: Stack performance issue
Message ID:
a05111b02b9463f9c623f@[63.120.19.221]
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.

[Snip]

>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.
-- 
                                         Dan

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

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About