Why is a linked list faster than Vector in AS3?

977 Views Asked by At

I tried the benchmark on this site: Array vs. Vector vs. Linked list. It tests the performance of iterating over said sequences.

Remarkably, iterating over a linked list is approximately 2.5x faster than a Vector.<int>. What is the reason for this counter-intuitive result?

1

There are 1 best solutions below

0
arithma On

Bounds checking and the indexing function call could be contributing a large chunk of the inefficiency.