From: Nicholas Clark Date: Mon, 4 Dec 2000 12:17:27 +0000 (+0000) Subject: ++ 20% faster X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=db332f3bb66861fe23fc47f86cbb0a2d9ea03129;p=p5sagit%2Fp5-mst-13.2.git ++ 20% faster Message-ID: <20001204121726.B52976@plum.flirble.org> Make '$i = ""; $i++' to produce true IVs without a hint of NVs. p4raw-id: //depot/perl@7974 --- diff --git a/sv.c b/sv.c index 912d694..69ed824 100644 --- a/sv.c +++ b/sv.c @@ -4651,9 +4651,9 @@ Perl_sv_inc(pTHX_ register SV *sv) } if (!(flags & SVp_POK) || !*SvPVX(sv)) { if ((flags & SVTYPEMASK) < SVt_PVNV) - sv_upgrade(sv, SVt_NV); - SvNVX(sv) = 1.0; - (void)SvNOK_only(sv); + sv_upgrade(sv, SVt_IV); + (void)SvIOK_only(sv); + SvIVX(sv) = 1; return; } d = SvPVX(sv);