[{"data":1,"prerenderedAt":288},["ShallowReactive",2],{"project-39124614":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":35,"aspects":36,"strip":43,"post_text":45,"what":46,"said":69,"maker_in_thread":171,"shape":173,"grid":176,"attempts":245,"same_week":250,"maker_shows":33,"maker_hidden":280,"reader_version":281,"card":282},"39124614","imap","Integer Map Data Structure","title","Show HN: Integer Map Data Structure","https:\u002F\u002Fgithub.com\u002Fbillziss-gh\u002Fimap","github.com","billziss",1706142538,2024,91,27,900,3515,26,"notable","languages","data structure library","library",[24,25,26,27,28],"integer map","radix tree","ordered map","trie","c++","debated",-0.125,{"positive":32,"neutral":33,"mixed":34,"critical":33},4,6,0,16,{"idea":37,"design":40,"performance":41,"execution":42},{"positive":38,"critical":39},1,3,{"positive":38,"critical":34},{"positive":38,"critical":39},{"positive":34,"critical":34},[39,34,34,34,34,39,38,34,38,34,38,44,34,34,39,34,34,39,44,44,38,34,38,44,39,38,39],5,"This project presents a new data structure for storing ordered integer maps. The proposed data structure is a compressive, cache-friendly, radix tree that has performance comparable to an unordered map (`std::unordered_map`) and is an order of magnitude faster than an ordered map (`std::map`).",{"problem":47,"audience":53,"pricing":53,"motivation":53,"time_to_build":53,"stack":54,"openness":67,"stage":68,"team_size":68},{"value":48,"source":49,"evidence":50},"Storing ordered integer maps with performance close to unordered maps","maker",[51],{"id":52},"post",null,[55,63],{"value":56,"source":57,"evidence":58},"C","commenter",[59],{"id":60,"by":61,"text":62},"39125543","repsilat","This is a radix tree (ordered, does more allocations), that is a hash table. Also TFA is C\u002FC++, libgdx looks like Java.",{"value":64,"source":57,"evidence":65},"C++",[66],{"id":60,"by":61,"text":62},"open_source","unknown",{"praise":70,"objections":85,"requests":117,"questions":136,"alternatives":143},[71,81],{"value":72,"source":57,"evidence":73},"Novel subnet-mask style prefix construction",[74,78],{"id":75,"by":76,"text":77},"39127408","ww520","This looks very good. The idea of using a subnet-mask style to compute the prefix of a node is pretty novel. I haven't seen anything like it. The choice of span factor of 16 is a…",{"id":79,"by":76,"text":80},"39132037","Subnet mask style prefix construction is pretty novel.",{"value":82,"source":57,"evidence":83},"Good node slot packing and span factor choice",[84],{"id":75,"by":76,"text":77},[86,96,103,110],{"value":87,"source":57,"evidence":88},"Benchmarks only against std::map and std::unordered_map, missing stronger alternatives",[89,93],{"id":90,"by":91,"text":92},"39126691","jemfinch","This really doesn't seem to be comparing to comparable data structures. For int map specializations like this, the optimized alternatives are things like Judy (which is looking…",{"id":94,"by":91,"text":95},"39127435","I've written a lot of high performance\u002Fscale C++ code using a lot of data structures over the years, and ordered iteration has been very rarely needed; unordered data structures…",{"value":97,"source":57,"evidence":98},"Item count limited to about 67 million (2^26)",[99],{"id":100,"by":101,"text":102},"39127113","ursusmaritimus","Interesting, but the summary does not mention an important fact: the data structure can contain at most 67108864 items, which is a quite low limit.",{"value":104,"source":57,"evidence":105},"Mutable and lacks batch set operations",[106],{"id":107,"by":108,"text":109},"39128891","JonChesterfield","Appears to be a 16 way branching trie which completely misses both advantages of tree structures over hashes: 1\u002F This tree is mutable, insert doesn't give you a new tree via path…",{"value":111,"source":57,"evidence":112},"Looks like a standard 16-way compressed trie",[113],{"id":114,"by":115,"text":116},"39128003","ot","What novel ideas did you see here? To me this looks like a standard 16-way compressed trie. The node encoding is quite natural if you consider the limitation of 64M entries…",[118,129],{"value":119,"source":57,"evidence":120},"Benchmark against Judy arrays, roaring bitmaps, absl::btree_map and crit-bit trees",[121,122,125],{"id":90,"by":91,"text":92},{"id":123,"by":76,"text":124},"39127289","Oh come on. Don't be too harsh. This is an ordered map. Most of the mentioned ones are unordered maps. They might be fast but they are unordered. The only comparables are…",{"id":126,"by":127,"text":128},"39126644","notfed","It'd be nice to include djb's crit-bit tree implementation (linked to from the intro) in the benchmarks (\"Performance Test\" section).",{"value":130,"source":57,"evidence":131},"Explain why 32-bit ints are used instead of 64-bit",[132],{"id":133,"by":134,"text":135},"39130499","xaellison","This limit comes from using int32s. Does anyone have an idea why on modern machines it isn't making use of int64s?",[137],{"value":138,"source":57,"evidence":139},"Do insertions invalidate iterators?",[140],{"id":141,"by":61,"text":142},"39125575","Looks rad, I was going to look into some b-trees for a use-case where I need an ordered map of things similar to integers and this might be better. I couldn't immediately see, is…",[144,152,159,163,167],{"value":145,"source":57,"evidence":146},"Judy arrays",[147,151],{"id":148,"by":149,"text":150},"39127233","AaronFriel","Interesting! Reminds me a great deal of Judy Arrays: https:\u002F\u002Fen.m.wikipedia.org\u002Fwiki\u002FJudy_array Judy Arrays are a radix trie with branching and a few node types designed to be…",{"id":90,"by":91,"text":92},{"value":153,"source":57,"evidence":154},"Haskell IntMap",[155],{"id":156,"by":157,"text":158},"39124816","bts","FWIW there is prior art here. e.g. see IntMap in Haskell: https:\u002F\u002Fhackage.haskell.org\u002Fpackage\u002Fcontainers-0.7\u002Fdocs\u002FData-IntMap-Strict.html",{"value":160,"source":57,"evidence":161},"absl::btree_map",[162],{"id":123,"by":76,"text":124},{"value":164,"source":57,"evidence":165},"Roaring bitmaps",[166],{"id":90,"by":91,"text":92},{"value":168,"source":57,"evidence":169},"absl flat_hash_map \u002F folly F14",[170],{"id":90,"by":91,"text":92},{"comments":34,"answered":34,"key":172},[],{"commenters":174,"max_depth":33,"maker_replies":34,"first_comment_mins":15,"lifespan_hours":175},17,19,[177,179,183,187,190,192,195,197,199,200,203,205,207,212,215,219,220,222,223,225,228,231,233,235,239,241,243],[156,34,39,178,157,34],"project\u002Fneutral\u002Fidea",[180,34,34,181,182,34],"39126161","commenter\u002Fneutral\u002Fidea","kccqzy",[184,34,34,185,186,34],"39127705","commenter\u002Fpositive\u002Fnone","zogrodea",[188,34,34,189,182,34],"39132294","commenter\u002Fneutral\u002Fnone",[191,34,34,189,186,34],"39133507",[193,34,39,194,76,34],"39127312","project\u002Fneutral\u002Fdesign",[90,38,38,196,91,34],"project\u002Fcritical\u002Fperformance",[123,38,34,198,76,34],"commenter\u002Fneutral\u002Fperformance",[94,38,38,196,91,34],[201,38,34,202,76,34],"39127555","commenter\u002Fpositive\u002Fidea",[114,38,38,204,115,34],"project\u002Fcritical\u002Fidea",[79,38,44,206,76,34],"project\u002Fpositive\u002Fidea",[208,209,34,210,211,34],"39127673",2,"other\u002Fneutral\u002Fnone","lichtenberger",[213,39,34,210,214,34],"39125533","NWoodsman",[216,32,39,217,218,34],"39125513","project\u002Fneutral\u002Fperformance","winrid",[60,32,34,189,61,34],[221,32,34,189,218,34],"39126153",[148,44,39,178,149,34],[141,33,44,224,61,34],"project\u002Fpositive\u002Fnone",[75,226,44,227,76,34],7,"project\u002Fpositive\u002Fdesign",[229,226,38,204,230,34],"39127529","mrazomor",[232,226,34,181,76,34],"39127860",[100,234,38,196,101,34],8,[236,234,44,237,238,34],"39127180","project\u002Fpositive\u002Fperformance","bjoli",[133,234,39,240,134,34],"project\u002Fneutral\u002Fexecution",[107,242,38,204,108,34],9,[126,244,39,217,127,34],10,[246,249],{"id":247,"t":248,"points":38,"comments":34},"36431956",1687440978,{"id":4,"t":12,"points":14,"comments":15},[251,255,260,265,270,275],{"id":252,"name":253,"points":254,"category":20},"39180953","Boardzilla",574,{"id":256,"name":257,"points":258,"category":259},"39159418","Pong Wars",490,"games",{"id":261,"name":262,"points":263,"category":264},"39191870","Ubicloud",475,"infrastructure",{"id":266,"name":267,"points":268,"category":269},"39148336","PlatoEdu",289,"learning_science",{"id":271,"name":272,"points":273,"category":274},"39201182","gpt",280,"ai",{"id":276,"name":277,"points":278,"category":279},"39207570","Stanchion",273,"data",false,"v2",{"id":283,"name":5,"line":6,"ai":280,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":284,"top":18,"kw":285,"maker":11,"domain":10,"tier":19,"attempts":209,"strip":286,"url":9,"mix":287,"praise":72,"objection":87,"sub":21},39124614,-0.12,[24,25,26,27,28],"300003101015003003551015313",[32,33,34,33],1794036648677]