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

Re: [perl #18127] [PATCH] Implicit stack direction probe

Thread Previous | Thread Next
Jason Gloudon
October 29, 2002 06:08
Re: [perl #18127] [PATCH] Implicit stack direction probe
Message ID:
On Tue, Oct 29, 2002 at 02:40:14PM +0100, Leopold Toetsch wrote:

> >+        cur_var_ptr = (size_t)((ptrdiff_t)cur_var_ptr + 
> When PARROT_PTR_ALIGNMENT is not 1, that much pointers -1 are skipped 
> during stack scanning by incrementing cur_var_ptr by sizeof(size_t) * 

ptrdiff_t is not a pointer type, so cur_var_ptr + PARROT_PTR_ALIGNMENT skips
exactly PARROT_PTR_ALIGNMENT bytes. You may not be matching ( )'s quite right.

> As a side note: applying your patch slows down e.g. life.pasm by ~2%.
> (I really don't see why).

Are you compiling with optimization enabled ? Is the difference consistent ?
If the answer to both questions is yes, it is probably a cache effect related
to the new variable on the function stack. I doubt the slowdown is universal.
I will try to check on SPARC sometime today.


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