> "The technical primitive data structure here is a hashmap where the keys are sorted."<p>..somewhere, this person's algorithms teacher is pondering about his life choices.
I don't know anything about rocksdb, but this approach on surface level seems like it could be very slow? Wouldn't it be more efficient to encode the semver in a format more suitable to sorting
Using RocksDB here seems fairly insane unless you need to keep (at least) several billion constantly-updating versions sorted. Otherwise you can just use SortedMap and regular Java comparators.
I am curious, I recently wrote a naive hashmap for C. I am curious about iterating in insert and sort order.<p>Is it possible for a hash function to maintain a sort relationship to it's input and output?