Fastest way to select based on id number

BlitzMax Forums/BlitzMax Programming/Fastest way to select based on id number

Czar Flavius(Posted 2011) [#1]
If depending on the id number, I want to return a particular object, is it faster to use a Select-Case statement, or to put them in a map ordered by a string id? If Select-Case converts to a chained If statement, theoretically a map would be faster! And more convenient.


ziggy(Posted 2011) [#2]
Faster whould be to use an Array, and make the ID the index of the array (if possible)


Czar Flavius(Posted 2011) [#3]
Why didn't I think of that!

Thanks, Ziggy!