<div class="gmail_quote">On Mon, Jun 15, 2009 at 16:12, Aryeh Gregor <span dir="ltr"><<a href="mailto:Simetrical%2Bw3c@gmail.com">Simetrical+w3c@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On Mon, Jun 15, 2009 at 7:11 PM, Kristof<br>
<div class="im">Zelechovski<<a href="mailto:giecrilj@stegny.2a.pl">giecrilj@stegny.2a.pl</a>> wrote:<br>
</div><div class="im">> The complexity of using a set/map is logarithmic in the size of the set.<br>
<br>
</div>Not if it's implemented as a hash table.<br>
<br>
Is DOMTokenList really expected to store lists large enough that this<br>
asymptotic behavior matters, though?<br>
</blockquote></div><br>For WebKit I was initially not planning to use a backing map/set. Class lists should be pretty small and for small lists it is faster to iterate over the list than using a hash table. If this ends up being a performance issue a backing map/set can be used. (WebKit uses a vector internally and does O(n) lookups when computing the style so I doubt it will be a performance issue.)<br clear="all">
<br>-- <br>erik<br>