Subject: Re: /etc/services entries (was: CVS commit: src/etc)
To: NetBSD User-Level Technical Discussion List <>
From: Greg A. Woods <>
List: tech-userlevel
Date: 05/14/2007 13:08:32
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

At Sun, 13 May 2007 15:04:39 +0200, Bernd Ernesti wrote:
Subject: Re: /etc/services entries (was: CVS commit: src/etc)
> 2. The penalty to lookup such a huge file seems not worth it

The penalty of a lookup on even a 500kB /etc/services file, like I've
been using for nearly 10 years now, is not as large as you seem to think
it is -- even with the old style straight linear search.  Even the lowly
little slow old sparc-5 I use for my firewall has no measurable troubles
with handling a complete /etc/services file.

Premature optimization is the root of all evil in programming.
        -- C.A.R. Hoare

We should forget about small efficiencies, say about 97% of the time:
premature optimization is the root of all evil.
         -- Donald Knuth (re-quoting Tony Hoare)

The key to performance is elegance, not battalions of special cases.
The terrible temptation to tweak should be resisted unless the payoff is
really noticeable.
        --Jon Bentley and Doug McIlroy (paraprhasing Tony Hoare)

> 3. The size of /etc increased quiet a bit

Well maybe for the floppy, but it really doesn't matter for any other
normal purpose.  (Embedded systems are a special case anyway and so
don't influence this at all.)

For my 1.6.x builds I created and use a tiny src/etc/services.floppy
file for use in the limited-size install media, and that's trivial to
do.  I haven't been building small floppies with 3.x and 4.x so I
haven't re-created that patch for more recent builds (yet).

						Greg A. Woods

H:+1 416 218-0098 W:+1 416 489-5852 x122 VE3TCP RoboHack <>
Planix, Inc. <>       Secrets of the Weird <>

Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

Version: PGPfreeware 5.0i for non-commercial use
MessageID: 4yyAtkbGy/YIahndjq1j9YPVlTejpXIZ