Skip to content

Move to optimised starts_with implementation for C++17 and standard library version for C++20

Stewart Martin-Haugh requested to merge smh/athena:starts_with_opt into main

C++17: use the trick reverse find, starting at 0, that outperforms other starts_with options:

https://quick-bench.com/q/AvndArmGIoaqSzRD-XwjH5pky8c

C++20: use the standard library interpretation.

Prompted by !66278 (merged) - if we're using this in more places, it should be the fast one.

cc @abarton @averbyts

Merge request reports

Loading