Message-ID: <LAW2-F113pL32ctFfj
800000d81@hotmail.com>
unshift() speedup.
p4raw-id: //depot/perl@7825
register I32 i;
register SV **ary;
MAGIC* mg;
+ I32 slide;
if (!av || num <= 0)
return;
}
if (num) {
i = AvFILLp(av);
+ /* Create extra elements */
+ slide = i > 0 ? i : 0;
+ num += slide;
av_extend(av, i + num);
AvFILLp(av) += num;
ary = AvARRAY(av);
do {
ary[--num] = &PL_sv_undef;
} while (num);
+ /* Make extra elements into a buffer */
+ AvMAX(av) -= slide;
+ AvFILLp(av) -= slide;
+ SvPVX(av) = (char*)(AvARRAY(av) + slide);
}
}