Re:A compact bitset implementation used in Ocarina of Time s...
by jb55 on Tuesday July 08, 2025 @01:04PM
(#44501902)
updated for the hacker news crowd
https://github.com/jb55/oot_bitset#:~:text=Hacker%20news%20f...
Re:A compact bitset implementation used in Ocarina of Time s...
by lpribis on Tuesday July 08, 2025 @01:44PM
(#44502299)
Haha, good to take the classic HN condescension on the chin ;)
Re:A compact bitset implementation used in Ocarina of Time s...
by TimorousBestie on Tuesday July 08, 2025 @03:31PM
(#44503227)
For what it’s worth, I found it interesting. I like your verve.
Re:A compact bitset implementation used in Ocarina of Time s...
by orlp on Tuesday July 08, 2025 @04:24PM
(#44503757)
My comment was worded a bit too harshly, sorry about that, I certainly wouldn't have worded that way in a personal message.
As I mentioned the hexadecimal printing coincidence is a neat fact, I was just excited when clicking the link to find a novel bitset idea. In my disappointment to find the standard bitset (albeit with 16-bit limbs) I reacted a bit too harshly. And as per https://xkcd.com/1053/, just because something isn't new to me doesn't mean it's not new to anyone.
There is nothing novel about this really. It's neat that it works with hexadecimal printing to directly read off the sub-limb index but honestly who cares about that.
Outside of that observation there's no advantage to 16-bit limbs and this is just a bog-standard bitset where the first k bits indicate the position within the 2^k bit limb, and the remaining bits give you the limb index.