186 karma · joined January 8, 2020
Really we should be going to com.ycombinator.news/item?id=45789474 instead.
Major downside is that this would exclude people without access to payment networks, but maybe you could still have a rate-limited free option.
It has the nice property that the amortized cost of pushing/popping an element is independent of the number of other elements in the heap.
This of course means you lose some of the benefits of mmap (few system calls, automatic paging), but would maybe still be beneficial from a performance perspective.
Bazel is huge and complicated, but it allows making those kinds of assertions.
Tying your memory consumption heavily to the max stack depth also seems like it would be difficult to reason about IMO.
If I remember correctly this is a pretty fundamental limitation of persistent structures, so it's not like there is a better persistent map data structure out there waiting.