[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Re: HOWTO: convert flat list w/ level information

Subject: Re: Re: HOWTO: convert flat list w/ level information to a hierarchialone?u
From: David Tolpin <dvd@xxxxxxxxxxxxxx>
Date: Wed, 3 Dec 2003 14:48:56 +0400 (AMT)
saxon 6.5.3 freebsd
> >Look, the time is exponential.
> 
> I'll believe that it's quadratic, but I think it's most unlikely to be
> exponential.
> 
> O(2^n) is not the same as O(n^2)!
> 

If data is two times longer, the computation time is 4 times longer with quadratic 
dependence, right? With the alogirthm that uses unlimited lookahead it is
100 ms for 100 nodes
1000 ms for 200 nodes
according to Dimitre's data.

My testing environment is 100 times slower. 

10 s for 100 nodes
32 s for 150 nodes
120 s for 200 nodes
350 s for 250 nodes
920 s for 300 nodes 

Looks like exponential. Time grows 3 times with each additional 50 nodes. 
This is with SAXON 6.5.3, JDK 1.3.1/FreeBSD, Pentium II 700MHz. Deviations
are due to garbage collection, I think.

Although I was never formally taught the theory of algorithms, I will try to provide
a formal proof.

David




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.