[haXe] Array.push() and Array[i]
Nicolas Cannasse
ncannasse at motion-twin.com
Wed Aug 8 18:05:05 CEST 2007
Jake Lewis a écrit :
> There seems to be a wild disparity between the efficiency of calling
> Array.push in haxe compiled AS3 , Flash IDE compiled AS3 and neko
- for Array.push in haXe, it should have been optimized on CVS with a
recent update. Other Arrays accesses should perform the same in both AS3
and haXe since they generate the same code. Please make sure that your
tests are run several times in order to get an average timing which will
be more accurate
- in Neko, unless you need indexed access, Lists are always better.
Arrays can be used also, but push/remove are costly since it requires
copying the whole array content when array memsize is extended. For big
arrays presizing and no 'remove' is highly recommanded.
Nicolas
More information about the Haxe
mailing list