develooper Front page | perl.perl5.porters | Postings from May 2010

Re: [PATCH] shift; optimization

Thread Previous | Thread Next
Reini Urban
May 3, 2010 13:06
Re: [PATCH] shift; optimization
Message ID:
2010/5/3 Ruslan Zakirov <>:
> While testing a simple benchmark script I noticed that threaded
> version is 25% faster. I suspect that the code may be is not thread
> safe, however don't know anything about perl threads.

This is because threaded passes the my_perl struct on the stack,
PL_op is just 4(%esi).
Accessing stack locals is much faster than accessing a global.
Reini Urban 

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