4 ms·
Could you elaborate on that a bit? First I thought you wanted to compare to a straight hash table but then the sorting threw me off :)
by codr4life 10y ago
Could you elaborate on that a bit? First I thought you wanted to compare to a straight hash table but then the sorting threw me off :)
- Volt 10y agoHashtables are unordered by key, so if you want ordering for those keys, which would really be the set elements, you'll have to sort.
- codr4life 10y agoI get it, hash table for membership and manual ordering. That's an option. From my experience; hashed sets are more expensive to set up, because of the slots; making small repetitive sets less appealing. And manual ordering is not always an option. I tried adding hashing on top of slists, an array of slists basically; to get away from traversing the whole thing for large sets; but the results were disappointing, basically identical performance.