Array.find()vs二进制搜索vs Array.forEach()在排序数组中

I'm wondering , which method should be faster. I know that if array not sorted native find or forEach would be better suit for it, but if array is sorted already? For example i got sorted array [{a: 1},{a:2},{a:3}...] and i need find some an element where a = x which method is better, Array.find(), binary search or Array.forEach()?

评论