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

Re: pp_add -> pp_i_add efficiency hack?

Thread Previous | Thread Next
Nicholas Clark
October 5, 2000 06:19
Re: pp_add -> pp_i_add efficiency hack?
Message ID:
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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About