WoutProvost/samp-sound-array

Binary search or hash

WoutProvost opened this issue · 0 comments

If this library were to be used in a production server (which is not recommended in the first place), a binary search (or even better, a hash!) should be used in the GetSoundInfo function instead of a linear search, since the array is already sorted anyway.

Direct array access would be a huge waste of space, since the amount of entries (around 7000) is much less than the maximum ID (around 45000).