by Ricardo Fernández Serrata
Faster than indexOf() if the array is huge. Also supports: text string if the target is a codepoint, dictionary where keys are decimal integers, and array of text strings.
The example array contains the 1st 32 prime numbers. The example target value to search is set to 11, which should return 4 if the array is kept sorted in ascending order.
This WON'T work correctly if the container is unsorted or sorted in descending order.
I added protection against infinite looping by checking if #A equals 0 (implicitly done using `LR = -1`).
For even faster performance, this uses branchless computing techniques.
Rate and review within the app in the Community section.