Re: memory waste in macro recursion

Eric Blake <[email protected]>
Newsgroups gmane.comp.gnu.m4.patches
Message-ID <[email protected]>
Eric Blake <ebb9 <at> byu.net> writes:

> I have also gotten foreachq3.m4 reduced from quadratic down 
> to logarithmic scaling in time;

In case it wasn't obvious, I meant log-linear [O(n logn)] and not logarithmic
[O(logn)] in the above sentence, seeing as how the latter is impossible - the 
best case is linear [O(n)], since every element must be processed, and m4 is 
not multi-threaded.  I'm also balancing my work against the fact that too much 
bookkeeping to speed up the heavily recursive cases can also increase the 
coefficient and thus slow down the common non-recursive cases.

-- 
Eric Blake
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.