danaj/Math-Prime-Util — pull request #6 by bulk88 (2013-12-31 02:20:27+00:00)
Title: various XSUB optimizations

in prime_memfree convert _XS_prime_maxbitsm from alias to pure perl
possibly constant folding const sub

in _XS_prime_count, if G_VOID, don't alloc or fetch any SVs if returning
nothing, use TARG to return a UV, PUSHu unrolled for locality to
put XSprePUSH near PUSHs and PUTBACK into a 3 statement function call free
area of stack manipulation

in _XS_miller_rabin, XSRETURN_IV would generate a new mortal SVIV,
instead of using the TARG SV* already allocated and set to IV on one
particular execution path, TARG is more efficient since it often is a
pad SV of the caller pure perl sub, and takes a shortcut through sv_setsv
if both src and dest SV*s are identical

in _XS_ExponentialIntegral factor out the SvNV and SvUV, teach compiler to
optimize out the default and not complain about it on < 4 branch (in
theory, var ix could be negative since its an I32), MPUASSUME code is from
Perl 5.19

in _validate_num read my_perl->Istack_base less often (inside ST macro)