So am I correct that there is no equivalent of bsearch in Javascript for Arrays? E.g. no standard library bsearch?
Is there any plausible reason for this absence?
Conversation
Replying to
The high-level approach is a sorted map and set type abstracting it into a container type. Manually sorting an array and passing it to a function assuming that the input is genuinely sorted is a very low-level approach. It's not common in high-level languages in general.
1
3
It took a long time to get standard Map, Set and BigInt types. Sorted map/set types are fairly niche, especially since Map/Set preserve insertion order.
It has multiple implementations and a standardization process making it quite difficult to expand the standard library.

