nadako / Ash-Haxe

Port of Ash entity framework to Haxe
Other
131 stars 37 forks source link

Optimization: Type safe GenericListIterator #11

Open gamedevsam opened 10 years ago

gamedevsam commented 10 years ago

typedefs don't yield typesafe code. This essentially means each iterator "node" is a Dynamic object which is slow. I recommend using private class HasNext<T> instead of typedef.

nadako commented 9 years ago

I think we should get rid of GenericListIterator at all and provide strictly typed inlineable iterators for each collection. I'm not sure if I'll find time/motivation to work on that soon, but that's how it should be done it seems.