Bug 120042 - Add helper code to create a HashMap/HashSet of specific size
Summary: Add helper code to create a HashMap/HashSet of specific size
Status: ASSIGNED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Pratik Solanki
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-19 17:41 PDT by Pratik Solanki
Modified: 2013-10-02 12:29 PDT (History)
14 users (show)

See Also:


Attachments
WIP patch (2.84 KB, patch)
2013-08-19 17:45 PDT, Pratik Solanki
no flags Details | Formatted Diff | Diff
Patch (4.63 KB, patch)
2013-08-20 10:43 PDT, Pratik Solanki
webkit-ews: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pratik Solanki 2013-08-19 17:41:37 PDT
We should have a template that makes it easy to create a HashMap/HashSet to hold a known number of entries.
Comment 1 Pratik Solanki 2013-08-19 17:45:58 PDT
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.
Comment 2 Darin Adler 2013-08-20 09:51:24 PDT
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.
Comment 3 Pratik Solanki 2013-08-20 10:43:28 PDT
Created attachment 209206 [details]
Patch
Comment 4 Pratik Solanki 2013-08-20 10:45:31 PDT
(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 5 Early Warning System Bot 2013-08-20 10:50:52 PDT
Comment on attachment 209206 [details]
Patch

Attachment 209206 [details] did not pass qt-ews (qt):
Output: http://webkit-queues.appspot.com/results/1432490
Comment 6 Early Warning System Bot 2013-08-20 10:53:30 PDT
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 7 EFL EWS Bot 2013-08-20 11:38:33 PDT
Comment on attachment 209206 [details]
Patch

Attachment 209206 [details] did not pass efl-ews (efl):
Output: http://webkit-queues.appspot.com/results/1516571
Comment 8 EFL EWS Bot 2013-08-20 11:39:54 PDT
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 9 kov's GTK+ EWS bot 2013-08-20 12:27:46 PDT
Comment on attachment 209206 [details]
Patch

Attachment 209206 [details] did not pass gtk-ews (gtk):
Output: http://webkit-queues.appspot.com/results/1513648
Comment 10 kov's GTK+ EWS bot 2013-08-20 13:16:28 PDT
Comment on attachment 209206 [details]
Patch

Attachment 209206 [details] did not pass gtk-ews (gtk):
Output: http://webkit-queues.appspot.com/results/1511874