m4-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: memory waste in macro recursion


From: Eric Blake
Subject: Re: memory waste in macro recursion
Date: Tue, 13 Nov 2007 21:18:28 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

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







reply via email to

[Prev in Thread] Current Thread [Next in Thread]