Replies: 1 comment 1 reply
-
Thanks, now I appreciate the full triplet - even in the case of value being found, it can still make sense to access previous/next. 1/ If a match is found by "lucky guess" somewhere between two bounding keys, wouldnt it cause additional cpu cost to provide the precise (next,prev) siblings ? 2/ I still think an explicit return type would be safer for wide usage. A DU with data can provide names to the items, or a struct record could do. |
Beta Was this translation helpful? Give feedback.
-
This is the discussion thread for the
Map.binarySearch
, RFC FS-1135 (link tbd): the addition of aMap.binarySearch
function which would provide a way to find items with adjacent keys.Beta Was this translation helpful? Give feedback.
All reactions