Speed up array access by searching from the end backwards if we think the number is in the last half (fix #46)