Perhaps. The same warning should apply to ListCollectionView.
Gareth
On 26/05/15 05:29, Alex Harui wrote:
OK, good enough for me, although I don’t like enticing people to use APIs
that are slow when there’s a way that is 5 times faster. Maybe we should
warn folks about this in the asdoc?
-Alex
On 5/19/15, 2:25 PM, "Gareth Smith" <garethdanielsm...@gmail.com> wrote:
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.
This is how long each test takes:
Array: 0.1 sec
old ArrayList (get/set Item): 0.8 sec
new ArrayList (get/set Item): 0.9 sec
new ArrayList ([]): 5.6 sec
In summary, indexing sugar is really slow, but get/set item don't seem
to get much slower just by implementing Proxy.
Gareth
On 18/05/15 06:56, Alex Harui wrote:
On 5/17/15, 9:22 AM, "Gareth Smith" <garethdanielsm...@gmail.com> wrote:
I don't know about any performance impact.
Can you run a some of quick tests? Iterating on 1000 items via for-each
on an Array, via a loop on ArrayList.getItemAt() before your Proxy
change
and using [] and for-each on ArrayList after your new Proxy change?
And maybe also try 5000 and 10000 items if you have time.
Thanks,
-Alex