An iterator with a gt or gte option first seeks to the key greater than or equal to that option. It's not necessary to then compare every subsequent key to gt or gte.
Same goes for reverse iterators with lt or lte.
Makes no difference in benchmarks. Specific cases may benefit a little, like when keys are heavily padded (e.g. having to compare 0000001 against 0000002) which I tried and failed to simulate.
An iterator with a
gt
orgte
option first seeks to the key greater than or equal to that option. It's not necessary to then compare every subsequent key togt
orgte
.Same goes for reverse iterators with
lt
orlte
.Makes no difference in benchmarks. Specific cases may benefit a little, like when keys are heavily padded (e.g. having to compare 0000001 against 0000002) which I tried and failed to simulate.