[whatwg] DOMTokenList is unordered but yet requires sorting

Darin Adler darin at apple.com
Mon Jun 15 12:38:05 PDT 2009


On Jun 15, 2009, at 12:22 PM, Ian Hickson wrote:

> On Tue, 9 Jun 2009, Erik Arvidsson wrote:
>>
>
>> I was about to follow up on this. Requiring sorting which is O(n  
>> log n) for something that can be done in O(n) makes thing slower  
>> without any real benefit. Like João said the order should be  
>> defined as the order of the class content attribute.
>
> Fair enough. Done.

Since DOMTokenList requires uniqueness, then I suspect it's still O(n  
log n) even without sorting, not O(n).

     -- Darin




More information about the whatwg mailing list