r2272 - in trunk/varnish-cache: bin/varnishd include

Poul-Henning Kamp phk at phk.freebsd.dk
Tue Nov 20 19:07:28 CET 2007

In message <ujrmyt87rjm.fsf at false.linpro.no>, =?iso-8859-1?Q?Dag-Erling_Sm=F8rg
rav?= writes:
>"Poul-Henning Kamp" <phk at phk.freebsd.dk> writes:
>> Hmm, I generally tend to make sure asserts are cheap and then leave
>> them in.  It's not like the conditions become more acceptable because
>> you run production :-)
>That's a good principle, but where do you draw the line between
>keeping assertions cheap enough, and adding enough of them to matter?
>I prefer to have the option of compiling them out so I don't have to
>worry about how expensive they are.  There is no obviously expensive
>stuff in our assertions today (the obviously expensive stuff is in
>#ifdef DIAGNOSTICS), but even the cheap stuff adds up (and increases
>code size, which may hurt cache locality)

It is a tradeoff, but I do consider it on the same order as being
able to drive faster without the wasted weight of seat-belts and
airbags in the car :-)


Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

More information about the varnish-commit mailing list