TLists and the fact they store Objects

BlitzMax Forums/BlitzMax Programming/TLists and the fact they store Objects

Czar Flavius(Posted 2009) [#1]
Ok I don't want to derail Ziggy's thread, but I have this question. In C++ you can use templates I think, to create link lists and other data structures that can store a particular kind of object/class, whereas in Blitz they store just a generic Object type. Though this can be useful for generality, it does mean you have to convert the Object to another kind of type before using it. My question is, is this slow? Lists will often (though yes not always) be used just to store a single type (like when you make arrays of types, you don't usually declare them to be Object[]), so could it be faster to create/modify your own list which specialises in a particular type rather than Object? Or is this really much more trouble than it's worth?


N(Posted 2009) [#2]
A list made specifically for a certain kind of type isn't really going to be that much faster.


JoshK(Posted 2009) [#3]
Mark mentioned something about this specifically in some article somewhere. I'm in favor of anything that makes it faster.