no, it is not polished code if you have 3 or more conditions and you don't use a switch and you don't explain why there is several conditions... there is a total of some 9 or 10 separate pieces of logic in there and you string them together with if else if else if if if else if else if else
that's why there is a switch, it is much more concise and exact for 3+ cases
no, i'm talking about the function that i linked to, not the heap stuff... i'm not a fan of the heap you used either, making a simple priority queue is not that hard to write with concrete types and no need for all those type assertions
you don't get the benefit of badger if you think making keys with indexes in them, which is not how you do it with most other KV stores, is "bloat"
they are a separate log and so reading them is cheaper, and adding them doesn't require any work on the much bigger value log
badger is the best KV store in the field of data storage and you think it's bloated
unfortunately, that seems to be a common misunderstanding, and everyone goes on about LMDB but that shit is just a fucking giant swap file and depends on kernel to do its magic, and it still has write amplification problems, you add keys you have to restructure the values
not the same as badger, you can write keys all day long and it never has to compact the value log!