TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Indexing semantic versions in RocksDB

28 pointsby adamretterover 1 year ago

5 comments

utopcellover 1 year ago
&gt; &quot;The technical primitive data structure here is a hashmap where the keys are sorted.&quot;<p>..somewhere, this person&#x27;s algorithms teacher is pondering about his life choices.
评论 #38888526 未加载
zokierover 1 year ago
I don&#x27;t know anything about rocksdb, but this approach on surface level seems like it could be very slow? Wouldn&#x27;t it be more efficient to encode the semver in a format more suitable to sorting
评论 #39018072 未加载
评论 #38882435 未加载
morelispover 1 year ago
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.
评论 #38890029 未加载
gnulinuxover 1 year ago
&gt; The technical primitive data structure here is a hashmap where the keys are sorted.<p>Why not a tree based map instead?
评论 #38883275 未加载
samsquireover 1 year ago
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&#x27;s input and output?
评论 #38885879 未加载
评论 #38882410 未加载