Re: complexity of repeated use of m4_append

2008-07-15 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Ralf Wildenhues on 7/14/2008 1:23 PM: | Hi Eric, | | * Eric Blake wrote on Sun, Jul 13, 2008 at 05:40:51AM CEST: |> In the meantime, I coded up a test; I will probably commit it as |> m4/examples/append.m4 and add it to the m4 testsuite i

Re: complexity of repeated use of m4_append

2008-07-14 Thread Ralf Wildenhues
Hi Eric, * Eric Blake wrote on Sun, Jul 13, 2008 at 05:40:51AM CEST: > In the meantime, I coded up a test; I will probably commit it as > m4/examples/append.m4 and add it to the m4 testsuite if I can get m4 sped > up. The test shows that the current behavior is indeed quadratic: [...] > - -Dlimit

Re: complexity of repeated use of m4_append

2008-07-13 Thread Bruno Haible
> Eh? Even in that case it's O(n). Proof: Let n be the sum of lengths of the > arguments. Let 1/q (0 < q < 1) be the growth factor. Then > - the number of byte copies from the argument strings to working memory is > exactly = n, > - the number of zeroed bytes and of copied bytes spent in re

Re: complexity of repeated use of m4_append

2008-07-12 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 7/12/2008 6:44 PM: | Hi Eric, | |> I've added |> documentation to the autoconf manual to mention the algorithmic speed being |> dependent on the quality of the underlying m4 implementation, and recommending |> m4_append ov

Re: complexity of repeated use of m4_append

2008-07-12 Thread Bruno Haible
Hi Eric, > I've added > documentation to the autoconf manual to mention the algorithmic speed being > dependent on the quality of the underlying m4 implementation, and > recommending > m4_append over m4_append_uniq when duplicates can be tolerated. Thanks for doing that. > But I'm hoping tha