Skip to content

Commit

Permalink
Comment on the lack of binary search in window.py
Browse files Browse the repository at this point in the history
  • Loading branch information
clayote authored Aug 28, 2024
1 parent 3bddb0c commit 00608d9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions LiSE/LiSE/allegedb/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,9 @@ def _seek(self, rev: int) -> None:
return
past = self._past
future = self._future
# To optimize for random access, I'd want to do binary search...
# but time travel *isn't* random access; most of the time you
# want to go only a little bit back or forward.
if future:
appender = past.append
popper = future.pop
Expand Down

0 comments on commit 00608d9

Please sign in to comment.