develooper Front page | perl.perl5.porters | Postings from October 2000

Re: pp_add -> pp_i_add efficiency hack?

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
October 5, 2000 06:19
Subject:
Re: pp_add -> pp_i_add efficiency hack?
Message ID:
20001005141940.A284@plum.flirble.org
On Thu, Oct 05, 2000 at 06:38:59AM -0500, Jarkko Hietaniemi wrote:
> I have been down this path many times and I think I once even hacked
> pp_add and pp_substract to correctly detect overflow situations and
> returns IVs/UVs when possible.  The problem is that this slowed down
> Perl by about 10%.

even for a lazier test such as (for 32 bit ints) both bits 30 being clear
for addition means that there can't be overflow?
and both arguments < 2^16 for multiplication?

Nicholas Clark 

Thread Previous | Thread Next


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