Re: Asymptotic computational complexity bounds for DOM methods

On Sunday 2006-02-26 15:07 -0800, Maciej Stachowiak wrote:
> These don't necessarily have to be the tightest possible bounds. For  
> example, requiring Node.nextSibling to be O(1) might limit  
> implementations too much and an upper bound of O(log N) might be  
> sufficient. Sometimes there are also information-theoretic limits to  

Mozilla's implementation of Node.nextSibling is O(N) in the number of
(prior) siblings of the element.

-David

-- 
L. David Baron                                <URL: http://dbaron.org/ >
           Technical Lead, Layout & CSS, Mozilla Corporation

Received on Monday, 27 February 2006 09:16:13 UTC