[webkit-dev] Performance of NamedAttrMap

Darin Adler darin at apple.com
Thu Oct 29 14:33:34 PDT 2009


On Oct 29, 2009, at 2:32 PM, Darin Adler wrote:

> 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 forgot to mention:

I believe the common case for attributes is a very small number of  
attributes. Having one element with many attributes is quite uncommon.  
This is one consideration when making improvements and optimizations  
here. Making sure the pathological case is not terribly slow is good,  
but we also want the normal case to be super-fast.

     -- Darin



More information about the webkit-dev mailing list