[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: optimize lt_combine
From: |
Gary V. Vaughan |
Subject: |
Re: optimize lt_combine |
Date: |
Fri, 19 Oct 2007 11:26:11 +0100 |
Hi Eric,
On 17 Oct 2007, at 19:25, Eric Blake wrote:
I liked the concept of lt_combine so much that I added m4_combine
to m4sugar.
In the process,
Thanks :-)
A while ago I considered shipping the useful stuff from m4sugar and
ltsugar
with m4 2.0... it might also give us some scope for speeding up some
of the
stickier implementations by moving them into a module in C.
I made some optimizations and some slight semantic changes:
- the separator is now used literally, rather than losing
whitespace after
comma
- the infix argument is now used literally, rather than undergoing
expansion
(consider m4_define([_],[oops])...)
- the quoting in m4_foreach is fixed (consider m4_define
([_Lt_suffix])...)
- useless use of m4_car is avoided, and the m4_shiftn(3, $@) is
now inlined
and done once up front, rather than once per _Lt_prefix
- the separator is no longer defaulted, so you can use an empty
separator
- the suffix list can now include an empty suffix, so the caller
must be
taught not to pass an empty suffix to preserve previous usage pattern
+ _lt_decl_varnames_tagged was the only caller for now, so I
optimized it as
well
+ right now, lt_decl_varnames_tagged is never called with more
than one
argument. It looks like it may have been intended to be called
with multiple
VARNAME arguments, rather than a single argument consisting of
multiple
VARNAMEs, but changing that is more invasive. So for now I just
added an
assert which will trigger if we ever change our minds, to remind us
to fix the
usage patterns appropriately.
All good!
OK to apply?
I'm writing the testcase for the last release blocker today, and
would rather
hold off on this until we've rolled the release personally. But it
is no more
intrusive than the lt_join optimisations Ralf agreed to, so if
someone else
wants to overrule and let you apply, I won't be heartbroken :-)
Cheers,
Gary
--
())_. Email me: address@hidden
( '/ Read my blog: http://blog.azazil.net
/ )= ...and my book: http://sources.redhat.com/autobook
`(_~)_ Join my AGLOCO Network: http://www.agloco.com/r/BBBS7912
PGP.sig
Description: This is a digitally signed message part