danaj/Math-Prime-Util — pull request #8 by bulk88 (2014-01-01 08:01:29+00:00)
Title: _validate_int, sieve_primes, _validate_num optimizations

in _validate_int, unroll and merge SvIOK and SvGMAGIC, turn SvIV to SvIVX
since IVX is gurenteed valid by now, a non-magical UV/IV will have a
function call free path, and fastest way out of this function with least
number of branches now. Convert SvPV to SvPV_nomg since get magic SVs cant
wind up at this point since "return 0" would have happened. I will leave
it up to compilers to detangle the duplicate tests between
"if (SvGAMAGIC(n))" "if (!SvOK(n))" and "if (SvROK(n) && !sv_isa" if any.

in sieve_primes stop using the Perl stack ASAP to free up registers/C stack
space, NULL assignment is optimized away if SP is never used again

in _validate_num, convert to bool, which uses immortal SV s which are more
efficient than allocing a new SV and also function call free