Re: [PATCH 4/4] gnulib-tool: faster string handling for Posix shells.

2009-01-17 Thread Bruno Haible
Ralf Wildenhues wrote: > > +# func_remove_prefix var prefix > > +# removes the given prefix from the value of the shell variable var. > > +# var should be the name of a shell variable. > > +# Its value should not contain a newline and not start or end with > > whitespace. > > +# prefix should not

Re: [PATCH 4/4] gnulib-tool: faster string handling for Posix shells.

2009-01-06 Thread Ralf Wildenhues
* Bruno Haible wrote on Fri, Jan 02, 2009 at 02:26:52AM CET: > > * gnulib-tool (func_strip): New function. > > You only ever need to strip the prefix _or_ the suffix, never both > simultaneously. Therefore it will be faster to define 2 functions. If it is ever possible that both are needed at the

Re: [PATCH 4/4] gnulib-tool: faster string handling for Posix shells.

2009-01-01 Thread Bruno Haible
Hello Ralf, 20% is a good speedup that you achieve here by use of shell built-ins instead of subprocesses and sed invocations. > * gnulib-tool (func_strip): New function. You only ever need to strip the prefix _or_ the suffix, never both simultaneously. Therefore it will be faster to define 2 fu

[PATCH 4/4] gnulib-tool: faster string handling for Posix shells.

2008-12-28 Thread Ralf Wildenhues
* gnulib-tool (func_strip): New function. (func_get_dependencies, func_get_automake_snippet): Use it where possible to avoid 'sed' with Posix shells. --- gnulib-tool | 96 -- 1 files changed, 66 insertions(+), 30 deletions(-) diff --git a/