tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: 64-bit masks

Let me be heretical: if you don't need a lot of these 64-item selections, why 
not use an array of 64 ints (or maybe chars or shorts, set up as a linked list? 
 Allocating the first free one is basically a single array index.  Freeing them 
if you don't need to maintain the order is just as fast.

This is a classic space-time tradeoff; you say you need the speed and RAM is 
quite cheap.  That doesn't mean waste it, of course, but you can certainly 
spend a bit of RAM to buy CPU cycles in many situations.  

Home | Main Index | Thread Index | Old Index