... since each splice needs to copy all the elements from $i to the end of the array.
Is that so? I always thought of splice being highly efficient, working "in-place", just "re-arranging elements", without need to copy anything. Can you ascertain your statement?
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
In reply to Re^2: Remove array elements dynamically!
by shmem
in thread Remove array elements dynamically!
by newbio
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |