> On 14 May 2026, at 9:36 am, Yusuke Suzuki via webkit-dev 
> <[email protected]> wrote:
> 
> Hello WebKittens!
> 
> Many DOM (& some JS, like, ES6 modules code) data structures require HashSet 
> / HashMap while also requiring “insertion ordering* iteration.
> Previously ListHashSet was the canonical solution for that, but this was 
> really costly in both memory and performance because it is internally a 
> doubly-linked list with HashTable.
> 
> I’ve introduced WTF OrderedHashSet / OrderedHashMap, which preserves 
> insertion ordering while maintain better memory footprint and performance 
> efficiency.
> HashSet / HashMap are the fastest and the most memory efficient, but 
> OrderedHashSet / OrderedHashMap is offering insertion ordering iteration (and 
> you can also rbegin / rend) while it does not add significant cost.
> 
> Internally, the algorithm is pretty similar to JSC’s PropertyTable (as 
> JSObject also needs to preserve insertion ordering and Hash table).
> Let’s summarize,

Have we done benchmarks to compare our HashMaps to std::map ? 

Jean-Yves

_______________________________________________
webkit-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to