[webkit-dev] Performance of NamedAttrMap

Darin Adler darin at apple.com
Thu Oct 29 14:32:05 PDT 2009


On Oct 29, 2009, at 2:30 PM, Jens Alfke wrote:

>  Is there any reason this couldn't be optimized to use a HashMap

Memory consumption is much greater.

> or at least binary search?

Would make lookups faster but parsing slower.

> (I thought the answer might be that the order of attributes is  
> significant; but I just checked the DOM spec, and NamedNodeMap is  
> explicitly unordered.)

The DOM specification is not what matters here. Behavior of actual  
browsers is what determines website compatibility. So you will need to  
do more research on that.

I think there could be some real room for improvement here, but also  
plenty of opportunity to unwittingly make things worse.

     -- Darin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20091029/8cfbea96/attachment.html>


More information about the webkit-dev mailing list