We should have a template that makes it easy to create a HashMap/HashSet to hold a known number of entries.
Created attachment 209144 [details] WIP patch This is the general idea. The names could do with some tweaking. The change to QualifiedName is to show how such a template might be used. If this looks good, I'll upload a proper patch.
I just don’t want to overuse this for hashes that should be generated at compile time instead. We need a good easy-to-reuse solution for fixed lookups known at compile time, based on gperf perhaps, or the binary search style that Anders and I cooked up for languages in RenderQuote, or something else even better.
Created attachment 209206 [details] Patch
(In reply to comment #2) > I just don’t want to overuse this for hashes that should be generated at compile time instead. We need a good easy-to-reuse solution for fixed lookups known at compile time, based on gperf perhaps, or the binary search style that Anders and I cooked up for languages in RenderQuote, or something else even better. Ok. So something like what you suggested in bug 119875. I was looking into that as well. We can hold off on this patch until I tackle that first. Removed review flag from patch.
Comment on attachment 209206 [details] Patch Attachment 209206 [details] did not pass qt-ews (qt): Output: http://webkit-queues.appspot.com/results/1432490
Comment on attachment 209206 [details] Patch Attachment 209206 [details] did not pass qt-wk2-ews (qt-wk2): Output: http://webkit-queues.appspot.com/results/1435471
Comment on attachment 209206 [details] Patch Attachment 209206 [details] did not pass efl-ews (efl): Output: http://webkit-queues.appspot.com/results/1516571
Comment on attachment 209206 [details] Patch Attachment 209206 [details] did not pass efl-wk2-ews (efl-wk2): Output: http://webkit-queues.appspot.com/results/1518539
Comment on attachment 209206 [details] Patch Attachment 209206 [details] did not pass gtk-ews (gtk): Output: http://webkit-queues.appspot.com/results/1513648
Comment on attachment 209206 [details] Patch Attachment 209206 [details] did not pass gtk-ews (gtk): Output: http://webkit-queues.appspot.com/results/1511874