I\'m looking to optimize this linear search:
static int linear (const int *arr, int n, int key) { int i = 0; while (i < n) {
loop backwards, this might be translated...
// loop backward for (int i = arraySize - 1; i >=0; --i)
...to this( "could be" faster ):
mov cx, arraySize - 1 detectionHere: ... loop detectionHere
Other than that, only binary search can make searching faster