Fastest iterables for each target

94 views
Skip to first unread message

TopHattedCoder

unread,
Mar 30, 2013, 10:02:06 PM3/30/13
to haxe...@googlegroups.com
Out of interest, I decided to run some benchmarks on the different iterables and their speed on each target. Here are the fastest dynamically-sized iterables out of List, Array and GenericStack for each platform, based on a benchmark of pushing every number up to 2 ^ 16 then popping each number:
Javascript: Array
Neko: List with 0.04 seconds [0.036 with hybrid array-vector Collection]
Java: Array with 0.02 seconds (GenericStack compilation failed) [0.021 with Array-based Collection]
C++: Array with 0.0058 seconds (GenericStack compilation failed) [0.007 with Collection that typedefs to GenericStack?]
Flash: Array with 0.01 seconds (GenericStack threw a ReferenceError) [0.007 with Collection that typedefs to Array]

Anyone know of any faster ways of implementing the Collection for each target or know why the GenericStack fails? This is on the very latest Haxe and Neko, by the way.

ianxm

unread,
Mar 31, 2013, 2:20:52 PM3/31/13
to haxe...@googlegroups.com
what about haxe.FastList?  actually, I don't see it in the docs anymore.  has it been removed?

Greg Dove

unread,
Mar 31, 2013, 2:22:46 PM3/31/13
to haxe...@googlegroups.com

Greg Dove
Dove Software Development Ltd
http://greg-dove.com


--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Michel Romecki

unread,
Apr 2, 2013, 12:06:28 PM4/2/13
to haxe...@googlegroups.com
Hi,
I've done these collection benchmarks with haxe 2.11 some monthes ago : 
http://mromecki.fr/en/#/post?url=haxe-nme-collections-benchmark
I don't know if some changes has occured since with haxe 3



2013/3/31 Greg Dove <greg...@gmail.com>

TopHattedCoder

unread,
Apr 2, 2013, 4:38:10 PM4/2/13
to haxe...@googlegroups.com
Nice! For reference, my 'hybrid array-vector collection' had an implementation very similar to Java's ArrayDeque if anyone's interested.
Reply all
Reply to author
Forward
0 new messages