I was looking at the performance of Element.getAttribute(), and I see
that NamedAttrMap, which actually stores the attributes, is
implemented as an unsorted array. This makes looking up an attribute
an O(n) operation. Is there any reason this couldn't be optimized to
use a HashMap, or at least binary search?
(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.)
—Jens
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev