summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-07-04 10:24:26 +0000
committerNicholas Clark <nick@ccl4.org>2005-07-04 10:24:26 +0000
commitaa0f650ec4a75cbd8e49db8ba715a9724f046b3a (patch)
treef66dc577bd440c11847eac3a836a1ca056ef8f80
parenteeb7067f600640f443da80dc2b1a896ce8cf58c5 (diff)
downloadperl-aa0f650ec4a75cbd8e49db8ba715a9724f046b3a.tar.gz
sv_setuv_mg is so rarely called that the IV optimisation test is not
needed. p4raw-id: //depot/perl@25064
-rw-r--r--sv.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/sv.c b/sv.c
index 83c2d4e610..0bf15d3ef6 100644
--- a/sv.c
+++ b/sv.c
@@ -1775,21 +1775,9 @@ Like C<sv_setuv>, but also handles 'set' magic.
void
Perl_sv_setuv_mg(pTHX_ register SV *sv, UV u)
{
- /* With these two if statements:
- u=1.49 s=0.52 cu=72.49 cs=10.64 scripts=270 tests=20865
-
- without
- u=1.35 s=0.47 cu=73.45 cs=11.43 scripts=270 tests=20865
-
- If you wish to remove them, please benchmark to see what the effect is
- */
- if (u <= (UV)IV_MAX) {
- sv_setiv(sv, (IV)u);
- } else {
- sv_setiv(sv, 0);
- SvIsUV_on(sv);
- sv_setuv(sv,u);
- }
+ sv_setiv(sv, 0);
+ SvIsUV_on(sv);
+ sv_setuv(sv,u);
SvSETMAGIC(sv);
}