flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gareth Smith <garethdanielsm...@gmail.com>
Subject Re: Why are there two ArrayList classes? [PING Justin Mclean)
Date Tue, 26 May 2015 21:31:35 GMT

I did it in a debug player - oops. I have just redone the tests in a 
release player, and with objects in addition to integers. I am using 
flashplayer 11 on Linux because that is the latest version available.

Timings for incrementing each integer in a million item array:

Array: 0.1 sec
old ArrayList (get/set Item): 0.4 sec
new ArrayList (get/set Item): 0.4 sec
new ArrayList ([]): 3.7 sec

Timings for initialising an array with either setItemAt({x: 0}, i) or 
array[i] = {x: 0} and then getting each item and incrementing x:

Array: 0.5 sec
old ArrayList (get/set Item): 0.9 sec
new ArrayList (get/set Item): 1.0 sec
new ArrayList ([]): 12.7 sec

So the results are similar to before: actually using the sugar is much 
slower than not doing so, but just extending Proxy makes little difference.


On 26/05/15 05:47, Justin Mclean wrote:
> Hi,
>> I have done some very unscientific tests: for each kind of list (Array, old ArrayList,
new ArrayList, new ArrayList - using sugar) the test code creates a million-item array and
then increments each value that it contains.
> Was this done in a release player? And did you try testing it on array of objects rather
than integers?
> Thanks,
> Justin

View raw message