Re: [xsl] Re: Keeping a running total?

Subject: Re: [xsl] Re: Keeping a running total?
From: Andrew Franz <afranz0@xxxxxxxxxxxxxxxx>
Date: Tue, 18 Jul 2006 09:02:30 +1000
Dimitre Novatchev wrote:

> So, how many times will parameter shift be required?


Parameter shift will occur whenever a factory's capacity is used up (Fn times)


So we have Fn shifts of parameters. Every shift of parameters takes
O(Qn) -because every parameter takes the velue of the next parameter.

If you say so.


I can conceive of a solution (in another language) where a parameter shift (i.e. remove 'head' from 'queue') bears no greater penalty than incrementing a pointer to the stack. Therefore it follows that your conclusion is implementation-specific.

Not that it really matters to *me* - I prefer XSLT to C or Assembler because of the clarity of expression.

As a manager, I'm more concerned with programmer-performance than program-performance & in the domain where I'm using/recommending this approach, the "factories" are table columns and "quotas" are rowspan attributes, so Fn and Qn are never going to be a concern.


Therefore, the time only the shift of parameters will require will be Fn * O(Qn)

which, of course can be written as:

O(Fn) * O(Qn).

This was my initial estimation and you now confirm it.

A better time complexity can be achieved if the "shift parameters"
operation can be replaced with something else.

Current Thread