Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #112807
| Subject | Re: [BBC] Programmers who use spaces 'paid more' |
|---|---|
| Newsgroups | comp.lang.c |
| References | (3 earlier) <7d149730-beb6-4bf1-bced-8df512eeb702@googlegroups.com> <20170621173913.92e094fdc3b8f0a2a27592ed@gmail.com> <hBw2B.64037$z73.59622@fx22.iad> <mkx2B.24281$mT6.6642@fx42.am4> <e9b10348-3695-46e2-95cf-d1fd9b4f0483@googlegroups.com> |
| From | bartc <bc@freeuk.com> |
| Message-ID | <8Hx2B.1108$Xa3.212@fx46.am4> (permalink) |
| Organization | virginmedia.com |
| Date | 2017-06-21 18:05 +0100 |
On 21/06/2017 17:48, Rick C. Hodgin wrote:
> On Wednesday, June 21, 2017 at 12:40:57 PM UTC-4, Bart wrote:
>> Full compilation with Tiny C took about 7% longer with the spaces (an
>> extra 0.25 seconds).
>
> I believe TinyC is able to compile the Linux kernel. Can you try
> to see how it goes with tabs and 8-spaces-per-tab?
I'm on Windows.
But I expect, on something that complicated, that spaces vs. tabs would
be insignificant, because it will spend its time:
* Running configure (a scripted language which calls other utilities
that use scripts)
* Running make, another scripted language
* Opening and reopening thousands of smallish files
* Doing processing other than the lowest level of tokenising, such as
#if processing, parsing, code generation etc
* Writing those results to a file.
But here's the loop in my preprocessor that deals with leading white
space (ie. white space following a new line, as that is different):
while (1)
switch (*++lxsptr) {
case ' ':
case tab:
break;
}
How long does it take to scan data in memory like that? Especially if
it's just been loaded (or has recently been compiled) so is already cached.
You can work out how many tens of MB per second it can work at, and
apply that to the number of extra MB that spaces would have.
(You gave a figure of 150MB extra, but I don't know how that is derived.
It's unlikely that a particular build will compile every source file, as
the Linux source serves many different platforms. But even at 150MB, it
make take one second extra.
My quick test showed 50ms extra for 17.5M extra characters, suggesting
about 350M chars/second, and that version wasn't even optimised code.
Of course, some compilers might be a little bit slower, but I really
don't think that scanning spaces is a bottleneck.)
--
bartc
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[BBC] Programmers who use spaces 'paid more' "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-18 21:45 +0800
Re: [BBC] Programmers who use spaces 'paid more' Per Sandberg <per.s.sandberg@bahnhof.se> - 2017-06-18 22:13 +0200
Re: [BBC] Programmers who use spaces 'paid more' "J. Clarke" <j.clarke.873638@gmail.com> - 2017-06-18 19:03 -0400
Re: [BBC] Programmers who use spaces 'paid more' Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2017-06-18 20:22 -0400
Re: [BBC] Programmers who use spaces 'paid more' "Pascal J. Bourguignon" <pjb@informatimago.com> - 2017-06-19 07:50 +0200
Re: [BBC] Programmers who use spaces 'paid more' "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-19 22:28 +0800
Re: [BBC] Programmers who use spaces 'paid more' gordonb.nakyl@burditt.org (Gordon Burditt) - 2017-06-19 03:24 -0500
Re: [BBC] Programmers who use spaces 'paid more' "Pascal J. Bourguignon" <pjb@informatimago.com> - 2017-06-19 18:42 +0200
Re: [BBC] Programmers who use spaces 'paid more' Snit <usenet@gallopinginsanity.com> - 2017-06-19 20:00 -0700
Re: [BBC] Programmers who use spaces 'paid more' "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-19 18:46 +0800
Re: [BBC] Programmers who use spaces 'paid more' "Chris M. Thomasson" <invalid@invalid.invalid> - 2017-06-18 18:19 -0700
Re: [BBC] Programmers who use spaces 'paid more' "J. Clarke" <j.clarke.873638@gmail.com> - 2017-06-18 22:23 -0400
Re: [BBC] Programmers who use spaces 'paid more' "Chris M. Thomasson" <invalid@invalid.invalid> - 2017-06-19 12:42 -0700
Re: [BBC] Programmers who use spaces 'paid more' "J. Clarke" <j.clarke.873638@gmail.com> - 2017-06-19 22:19 -0400
Re: [BBC] Programmers who use spaces 'paid more' "Chris M. Thomasson" <invalid@invalid.invalid> - 2017-06-20 11:44 -0700
Re: [BBC] Programmers who use spaces 'paid more' "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-19 18:47 +0800
Re: [BBC] Programmers who use spaces 'paid more' nospam@please.invalid (AnthonyL) - 2017-06-19 11:24 +0000
Re: [BBC] Programmers who use spaces 'paid more' "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-19 20:26 +0800
Re: [BBC] Programmers who use spaces 'paid more' JJ <jj4public@vfemail.net> - 2017-06-19 20:53 +0700
Re: [BBC] Programmers who use spaces 'paid more' "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-19 22:27 +0800
Re: [BBC] Programmers who use spaces 'paid more' Anton Shepelev <anton.txt@gmail.com> - 2017-06-21 00:51 +0300
Re: [BBC] Programmers who use spaces 'paid more' asetofsymbols@gmail.com - 2017-06-21 04:43 -0700
Re: [BBC] Programmers who use spaces 'paid more' "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-21 05:12 -0700
Re: [BBC] Programmers who use spaces 'paid more' Simon Wright <simon@pushface.org> - 2017-06-21 13:27 +0100
Re: [BBC] Programmers who use spaces 'paid more' "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-21 05:39 -0700
Re: [BBC] Programmers who use spaces 'paid more' bartc <bc@freeuk.com> - 2017-06-21 14:12 +0100
Re: [BBC] Programmers who use spaces 'paid more' "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-21 06:51 -0700
Re: [BBC] Programmers who use spaces 'paid more' GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-06-21 17:39 +0200
Re: [BBC] Programmers who use spaces 'paid more' "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-21 08:46 -0700
Re: [BBC] Programmers who use spaces 'paid more' GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-06-21 17:46 +0200
Re: [BBC] Programmers who use spaces 'paid more' "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-21 08:59 -0700
Re: [BBC] Programmers who use spaces 'paid more' GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-06-21 18:11 +0200
Re: [BBC] Programmers who use spaces 'paid more' scott@slp53.sl.home (Scott Lurndal) - 2017-06-21 15:50 +0000
Re: [BBC] Programmers who use spaces 'paid more' GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-06-21 17:53 +0200
Re: [BBC] Programmers who use spaces 'paid more' "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-21 09:01 -0700
Re: [BBC] Programmers who use spaces 'paid more' GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-06-21 18:16 +0200
Re: [BBC] Programmers who use spaces 'paid more' "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-21 09:28 -0700
Re: [BBC] Programmers who use spaces 'paid more' scott@slp53.sl.home (Scott Lurndal) - 2017-06-21 16:37 +0000
Re: [BBC] Programmers who use spaces 'paid more' bartc <bc@freeuk.com> - 2017-06-21 17:40 +0100
Re: [BBC] Programmers who use spaces 'paid more' "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-21 09:48 -0700
Re: [BBC] Programmers who use spaces 'paid more' bartc <bc@freeuk.com> - 2017-06-21 18:05 +0100
Re: [BBC] Programmers who use spaces 'paid more' "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-06-21 11:01 -0700
Re: [BBC] Programmers who use spaces 'paid more' bartc <bc@freeuk.com> - 2017-06-21 19:46 +0100
Re: [BBC] Programmers who use spaces 'paid more' David Kleinecke <dkleinecke@gmail.com> - 2017-06-21 12:21 -0700
Re: [BBC] Programmers who use spaces 'paid more' GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-06-21 21:31 +0200
Re: [BBC] Programmers who use spaces 'paid more' "Pascal J. Bourguignon" <pjb@informatimago.com> - 2017-06-21 18:48 +0200
Re: [BBC] Programmers who use spaces 'paid more' "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2017-06-22 00:52 +0800
csiph-web