WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
54973
We need a data structure with efficient access by key, and with order for the elements
https://bugs.webkit.org/show_bug.cgi?id=54973
Summary
We need a data structure with efficient access by key, and with order for the...
Benjamin Poulain
Reported
2011-02-22 10:47:42 PST
HashSet has ListHashSet for having a set with order. To implement 17425 effectively, we need the same kind of data structure for HashTable.
Attachments
Patch
(27.80 KB, patch)
2011-02-22 10:57 PST
,
Benjamin Poulain
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Benjamin Poulain
Comment 1
2011-02-22 10:57:35 PST
Created
attachment 83342
[details]
Patch
Benjamin Poulain
Comment 2
2011-02-22 11:00:52 PST
Maciej suggested I split the patch of 17425 to simplify the review. So I am splitting the diff, here is the data structure. Same comment as on 17425: ListHashTable interface is a lot like ListHashSet. I did not do the custom allocator because that would make the patch quite more complex and that does not have as much value for this use case as it had for the ListHashSet.
Geoffrey Garen
Comment 3
2011-02-22 11:01:32 PST
To match HashMap, I think you should call this class ListHashMap, not ListHashTable. HashTable is the name we use for the underlying data type these classes are implemented in terms of.
Benjamin Poulain
Comment 4
2011-02-22 11:12:56 PST
(In reply to
comment #3
)
> To match HashMap, I think you should call this class ListHashMap, not ListHashTable. HashTable is the name we use for the underlying data type these classes are implemented in terms of.
I really meant HashTable. If you look at the data structure, it uses an extractor to get the data out of the content. HashMap is using HashTable, storing a pair<>, and extracting the first element as the key. I think it was cleaner to use HashTable for RenderBlock because of the kind of usage we have with the FloatingObjects.
Eric Seidel (no email)
Comment 5
2011-02-24 02:56:40 PST
Mjs is your man for this review. Pick on him in #webkit.
Benjamin Poulain
Comment 6
2011-02-24 13:15:56 PST
Comment on
attachment 83342
[details]
Patch Maciej suggested to extend ListHashSet with template taking HashTranslator like for HashSet. That seems a good idea. I clear the review flag for now and I will extend ListHashSet tomorrow.
Benjamin Poulain
Comment 7
2011-02-25 08:20:23 PST
I extended ListHashSet, and updated 54972.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug