toydb icon indicating copy to clipboard operation
toydb copied to clipboard

Iterators should be O(1), streaming, and borrowless

Open erikgrinaker opened this issue 5 years ago • 0 comments

Iterators are currently rather hacky and inefficient, and e.g. use O(log n) lookups per next() call (B+tree and MVCC) or buffer all results (Raft and SQL engines). Ideally, iterators should have O(1) complexity when calling next(), stream all results (with some amount of IO buffering), and don't hold read borrows to the entire data structure for the lifetime of the iterator.

erikgrinaker avatar May 22 '20 09:05 erikgrinaker