{
    "byline": null,
    "charset": "UTF-8",
    "dir": null,
    "excerpt": "My earlier article on NF4 quantization mentioned an optimized Binary Search implementation that I learned about from Jon Bentley\u2019s Programming Pearls1, which unrolls the loop. I\u2019d written about this variant of Binary Search in my second book, Classical Algorithms in C++. The key insight in Binary Search that makes it such an important algorithm is that the number of comparisons needed to finish the search grows logarithmically in the size of the input array, with only about 30 comparisons needed to search a billion-element array. The classic implementation, as described by Kernighan and Ritchie (for example), features a loop that computes the midpoint index and halves the subarray under consideration until the search is done.",
    "lang": null,
    "length": 25122,
    "publishedTime": null,
    "siteName": null,
    "title": ""
}