3 ms·
java switch/case impl. is hash based but it includes equals as well. Perfect hashing might work for short string but overall it won't be a major improvement to
by xxs 8y ago
java switch/case impl. is hash based but it includes equals as well.
Perfect hashing might work for short string but overall it won't be a major improvement to contents check (one deference)