Indexing semantic versions in RocksDB

  • > "The technical primitive data structure here is a hashmap where the keys are sorted."

    ..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.

  • > The technical primitive data structure here is a hashmap where the keys are sorted.

    Why not a tree based map instead?

  • I am curious, I recently wrote a naive hashmap for C. I am curious about iterating in insert and sort order.

    Is it possible for a hash function to maintain a sort relationship to it's input and output?