Splice is O(N) only if you require that the Perl array be optimized for random access. If you're willing to allow for disjoint arrays and do some calculations that can be a bit fiddly, then you can make splice O(1) and random access O(1) (but potentially slower than it is right now).
In reply to Re^5: Array VS Linked List
by dragonchild
in thread Array VS Linked List
by asset
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |