Level / classic-level

An abstract-level database backed by LevelDB.
MIT License
58 stars 11 forks source link

Remove completed TODO comment #45

Closed vweevers closed 2 years ago

vweevers commented 2 years ago

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.

juliangruber commented 2 years ago

-1 from me, it doesn't have a measurable effect but increases the SLOC