in reply to Re^3: Fastest way to test membership in a constant set (Why not?)
in thread Fastest way to test membership in a constant set
Yeah! That cool 'n all, but you're hardly testing like with like. Show me where you code is looking up the words 'age', 'old' and 'years'?
In order to make bitsets practical you have to have a mechanism for mapping the real values (words in this case), with their representative bit patterns. The obvious, and fastest way to do that mapping is to use a hash. And by the time you've done that, you might as well discard the bitset because that hash is doing all the real work, and doing it twice will just be slower.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Fastest way to test membership in a constant set (Why not?)
by hipe (Sexton) on Aug 01, 2007 at 13:55 UTC |