With the current version, we will find the first element which is GE with linear lookup,
and the rest loops will consist of one iteration (overall it will always be the number of elements
in the array). If we change session_settings_next_in_module() to use binary search,
however, it will highly increase the number of comparisons, because, even though we know
that the next element is greater or equal, we are still looking for it in the array.
My initial patch takes advantage of the array being sorted for update and get methods,
leaving the case from above untouched. Perhaps I could try to make the first lookup
with binary search, and the rest with linear. What do you think?
Best regards,
Chris.