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

Re: pp_add -> pp_i_add efficiency hack?

Thread Previous | Thread Next
From:
Nick Ing-Simmons
Date:
October 8, 2000 08:10
Subject:
Re: pp_add -> pp_i_add efficiency hack?
Message ID:
E13iI5O-00022x-00@serv1.is1.u-net.net
Gurusamy Sarathy <gsar@ActiveState.com> writes:
>instead it should cast the IVX to NV and return that.  Among other
>things, this means making SvNV() do something like this:
>
>    #define SvNV(sv) (SvNOK(sv) ? SvNVX(sv)
>                                : (SvIOK(sv) ? (NV)SvIVX(sv) : sv_2nv(sv)))
>
>instead of this:
>
>    #define SvNV(sv) (SvNOK(sv) ? SvNVX(sv) : sv_2nv(sv))

You could do all that inside  sv_2nv() in the 1st instance  
rather than replicating all the tests everywhere SvNV() occurs.


>
>You could try that (embellish it further for UVness) and see where that
>takes you performance-wise...
>
>
>Sarathy
>gsar@ActiveState.com
-- 
Nick Ing-Simmons


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