.net - When should I use a BitVector32? -


i working on project @ moment need show 1 month days still available. there function calculates days available. colleagues said:"oh know, should return bitvector32. that's efficient when working list of booleans." have used list<bool> or that. bitvector32 seems me low level stuff when working bits.

so, question is. should use bitvector32 whenever need list of booleans less 32 items or should use low level stuff?

using list extensible other time periods. want show 2 month @ once. oh that's bigger 32. need change return type , everywhere it's used. great! , bitvector32 doesn't implement ienumerable<t>.

and unless it's in tight loop readability , maintainability top efficiency. , overhead of list allocation isn't big, unless million times per second.

so agree you should use bitvector32 low level code.


Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -