I believe splice will have to re-index each item following the item(s)
removed (or added).
If you do a benchmark you'll find that splice doesn't perform all that well
removing from the middle of large arrays.
If you plan on doing this a lot look into a linked list type structure. Of
course there are a lot of data structures
you can check out that might fit your needs. Good luck.

On Mon, Oct 12, 2009 at 8:39 AM, Baz <[email protected]> wrote:

>
>
> Hi, if I have a large array and I wanted to remove, say, item #455 - is
> splice the best way to do that? How efficient is splice? Does it loop
> through the array anyway behind the scenes, or does it use a more direct
> mechanism to remove the item and adjust the rest of the count?
>
> Cheers,
> Baz
>
>
>  
>

Reply via email to