The vast majority of attribute maps contain 4 or fewer attributes. Furthermore, an element with 0 attributes doesn't need an attribute map at all. With this in mind, we can give the attribute vector an inline capacity of 4 and avoid having the initial append() grow to 16 entries capacity.
Created attachment 120714 [details] Proposed patch
For reference, attributes per NamedNodeMap (Alexa top sites): No NamedNodeMap allocated: 76.579% 0: 0.073% 1: 22.046% 2: 1.219% 3: 0.039% 4: 0.038% 5: 0.002% ... and then dwindling downwards up to 13 attributes.
Comment on attachment 120714 [details] Proposed patch Nice. r=me.
Comment on attachment 120714 [details] Proposed patch Clearing flags on attachment: 120714 Committed r103791: <http://trac.webkit.org/changeset/103791>
All reviewed patches have been landed. Closing bug.