[webkit-dev] JS binding wapper pointers: inline vs. separate hash table

Geoffrey Garen ggaren at apple.com
Wed Oct 1 01:46:10 PDT 2008


> In the Chrome tree, every object inheriting from RefCounted incurs  
> an extra pointer in size, but this is clearly more than necessary  
> since many RefCounted objects do not have bindings.

If we believe that JS wrappers are relatively uncommon, we can store  
them in a Node's "rare data" structure, and bloat only those uncommon  
nodes that have JS wrappers.

If we believe that JS wrappers are relatively common, we can store  
them directly in a Node, since putting them in a hashtable is net more  
memory use.

Non-Node wrappers are another story. Perhaps they are all uncommon  
enough to go in a hash table.

Geoff


More information about the webkit-dev mailing list