Well, if you are not handling 1 million entities, this is quiet fast, even if you scan through the list with an average duration of O(n).
You can also create a binary tree and search in it - which is approx O(log (m) to base 2)... which is super fast if you have LOTS of entities. Even, in the worst case, a binary tree could have a in the worst case a O(n), when your first Item is an entity with the name "a" and then you always sort-in names with a higher rank. You can circumvent that even by implementing an AVL tree.
And if even this is not enough, you can try to make a hash list or hash tree, but this will give you only very little performance boost.
The point is: even if the developers of GS would implement this, they would take a similar approach. And since the fact that you can do this on yourself, I doubt there will be a faster implementation soon by their side.
I'm sorry. You have to write yourself these 100 lines.
Last edited by HeelX; 01/23/08 06:43.