Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Oct 1998 18:01:04 -0500 (CDT)
From:      James Wyatt <jwyatt@rwsystr.RWSystems.net>
To:        Nate Williams <nate@mt.sri.com>
Cc:        freebsd-chat@FreeBSD.ORG, freebsd-security@FreeBSD.ORG
Subject:   Re: Compiler likes tabs better than spaces?? (was Re: ..logging (the problem is fixed))
Message-ID:  <Pine.LNX.3.91.981010170604.8689C-100000@rwsystr.RWSystems.net>
In-Reply-To: <199810082218.QAA29900@mt.sri.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 8 Oct 1998, Nate Williams wrote:
> [ Moved to -chat, as this is really not security related... ]
> > Tabs in source can compile a *lot* faster in large C++ source and
> > headers. I also used it over NFS to do *nix programming before I got
> Now, this is one of those statements I *really* like to see, since it
> has no basis on factual data.  Using tabs vs. spaces won't make your
> program compile measurably faster.  Whoever told you this was smoking
> something....

btw: I'll answer here (once) because you were rather snippy in your
answer, you were wrong and our relay doesn't get -chat. I can understand
why your (Free) BS Detector might go off. 8{) I said the same thing a
while back when I heard it a while ago, so I measured it.

For heavy C++ (lotsa big headers made pretty and readable) and code
w/ASCII depictions of the structures and PVCS headers, tabs make a very
measurable (and sometimes noticable) difference. If you drop 7 (or 3) char
for every tab and have lots of them, your file reads go down, the compiler
reads more file per line (thus by a clock, compiles faster 8{), and you
save disk space. You also have less IO to your editor and such. Your PVCS 
(or SCCS/RCS/CVS/etc...) archives will also be smaller.

You're right if you note that everything past the precompiler is usually
constant, though. The effect is also reduced if your compiler utilizes
precompiled headers. Removing any successive whitespace, will also speed
things up, but at the expense of readability. OTOH, if one doesn't
tabbify, comment, or use headers much one might not notice... 8{(

As I said, I *did* time this a while back to measure the effect, so this
*is* based on fact and I was *not* smoking anything at the time... 8{) Ron
Light, the guy who drove me to Unix showed me how nice it was to 'entab'
the system headers and frequent-flyers when I was learning C and
unix/xenix long ago. (You'll notice FreeBSDs curses.h has tabs) I also
loved Borland when they implemented precompiled headers in Borland C++
back in the Win 3.1 days. 

Sorry to have wasted your time in replying to me, I'll try to be clearer
next time - Jy@ (James Wyatt jwyatt@rwsystems.net)

My favorite programming language is still solder - David Gunn KA5WAM

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.3.91.981010170604.8689C-100000>