Hacker News new | ask | show | jobs
by cullenking 3701 days ago
I plan on using it to track what database objects have a corresponding cached image thumbnail. 10 million objects in my database, thumbnails generated on the fly, fast get/set the unique ID of the object in the bitfield. very small storage for what you get.
1 comments

You can already do this using BITSET -- I tracked 100 million objects with incremental integer keys during a migration process and it worked great.

From what I read, BITFIELD behaves differently -- it treats your data as a series of "packed" bits. So while with BITSET you operate on each bit individually, with BITFIELD you operate on a series of bits with a starting offset, and you have to be mindful of the length.