Thread overview
[Issue 12991] Possible performance optimization for std.range binary search
Dec 17, 2022
Iain Buclaw
June 25, 2014
https://issues.dlang.org/show_bug.cgi?id=12991

Andrei Alexandrescu <andrei@erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrei@erdani.com

--- Comment #1 from Andrei Alexandrescu <andrei@erdani.com> ---
A cache-friendly binary search with cache friendliness and performance guarantees would be galloping search.

--
June 25, 2014
https://issues.dlang.org/show_bug.cgi?id=12991

--- Comment #2 from bearophile_hugs@eml.cc ---
(In reply to Andrei Alexandrescu from comment #1)
> A cache-friendly binary search with cache friendliness and performance guarantees would be galloping search.

That's not what I have suggested here. Here I have suggested to use binary search followed by linear search when the search range is few cache lines long. This is a generic (possible) improvement for the standard binary search, to be used (ideally) when you want to use a binary search.

Galloping search is for a different purpose, like when you know the data you search for is near the start (or end, or a given point) of the array.

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=12991

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4

--
December 01
https://issues.dlang.org/show_bug.cgi?id=12991

--- Comment #3 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/phobos/issues/10064

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--