xsl-list
[Top] [All Lists]

RE: [xsl] Efficently transposing tokenized data

2008-11-05 09:55:11
 
Assuming a large input, your approach looks more efficient to 
me as it avoids grouping where indexing into the list does the job.

Now I guess from previous answers on this list given to 
similar questions that this is all implementation-defined.

In spite of this, I'm asking whether that is all that can be 
said here or whether there is a rationale here to favor 
indexing over grouping when (a) processing time or (b) memory 
consumption are important?

In Saxon (a) grouping will actually build a hash table in memory, so it uses
more memory, and (b) indexing in the form $seq[integer] is a constant-time
operation, so the indexing approach should definitely be better.

Michael Kay
http://www.saxonica.com/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--