[Top][All Lists]

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

Re: versioning config.cache

From: Eric Blake
Subject: Re: versioning config.cache
Date: Fri, 01 May 2009 09:55:56 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20090302 Thunderbird/ Mnenhy/

Hash: SHA1

According to Dave Hart on 5/1/2009 9:15 AM:
>> Since this variable is under your complete control, I would have written
>> if test $ntp_cache_flush = 1; then
>>  ...
>> fi
>> rather than a case statement.
> That's a fine choice.  I think for my purpose I still prefer the case
> for legibiity, though i realize it's inefficient.

In the grand scheme of things, 'if test... fi' and 'case ... esac' are
both shell builtins, so no change in efficiency on the number of processes
spawned.  string comparison with test is slightly more efficient than
pattern matching with case, but that is probably in the noise compared to
avoiding process spawning.  So either option is probably as efficient as
you can get.

> You are thinking about performance on a completely different plane
> than me.  I'm impressed, and stunned, that anyone would seriously
> consider shaving a couple of grep invocations from a
> once-per-configure snippet of code given the obfuscation compared to
> the more rudimentary pipeline.  Still, I will look at it, it's a fun
> puzzle.

I tend to think of cygwin, where forks are EXPENSIVE.  But even on Linux,
shaving enough one-time forks can still make a noticeable difference.

>> Why not use AS_UNSET right now?
> NTP requires Autoconf 2.59, though in just the last few days there has
> been discussion about raising that to 2.61.  I do not know which
> version of Autoconf introduced AS_UNSET, but it was about 6 months
> ago.  A few times now, I have found myself wishing the wonderful
> Autoconf manual told me more often about the minimum version of
> Autoconf required to use a particular macro.

That has been asked before.  The biggest reason is laziness - no one has
contributed a patch to add the documentation, and although it is a rather
straightforward task, that doesn't make it any less tedious or
time-consuming to get right.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Mozilla -


reply via email to

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