OK, I’ve done an experiment and despite the warning, I can add 10M indices to
BitSet without a problem. Why does the documentation contain that warning, then?
Ultimately, it’s based on the size of a
usize, which is platform dependent. The number of bits at each layer is conditionally defined here:
So on a 32 bit machine, you can have
2**(5*4) ~= 1M entities, whereas on a 64 bit machine you can have
2**(6*4) ~= 16M entities.
Ah, I see. Thanks!