Perl-Sensitive Sunglasses | |
PerlMonks |
Re^7: Deleting specific array elementsby JavaFan (Canon) |
on Nov 27, 2008 at 10:37 UTC ( [id://726363]=note: print w/replies, xml ) | Need Help?? |
There's no significant speed difference. For both the scalar and the array, the get to the integer value from the SV or AV, one has to walk a pointer and add an offset.
It may even be that in the scalar case, perl checks IOK flag each time (to see whether it actually has a valid integer value), but that maybe optimized away. Anyway, there isn't much of a reason to store the length of an array in a seperate variable.
In Section
Seekers of Perl Wisdom
|
|