Quote Originally Posted by Earinor View Post
I just think about the many steps the program has to do just for this, it isn't that slow, you can't see it, but
Writing a linear search is of course the worst way to do it. As your array is sorted you can use something like qBinaryFind/qUpperBound/qLowerBound that brings it down to logarithmic order. Even better is introducing a hash tab where you would have a constant order.

Simply doing what we all learned in school.

Uwe