Sujet : Re: Baby X is bor nagain
De : david.brown (at) *nospam* hesbynett.no (David Brown)
Groupes : comp.lang.cDate : 18. Jun 2024, 08:01:48
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v4rbcs$17j40$2@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0
On 17/06/2024 23:01, bart wrote:
On 17/06/2024 17:21, David Brown wrote:
Using C without optimisation is like driving a car but refusing to go out of first gear. You would probably have been better off with a bicycle or driving a tank, according to the task at hand.
>
Which bit is the car: the compiler, or the program that it produces?
The compiler. It is the compiler you are pointlessly and counter-productively limiting.
Clearly (at least to people not intentionally misinterpreting this) the speed of the car is not analogous to the /speed/ of the compiler, but its functionality.
When I am developing, it is the compiler that is used more often. Or, if I spend a lot of time on a particular build of an application, the speed at which it runs is rarely critical, since during most testing, the scale of the tasks is small.
So if the compiler is the car, then one like tcc goes at 60mph while gcc goes at walking pace.
If you spend most of your development time compiling, you are an /extremely/ unusual developer.
I would expect that for most developers, the great majority of their time is spend reading - reading their own code, reading other people's code, reading documentation, API details, manuals, specifications, notes, and everything else. The tool they spend most time with is their IDE, along with whatever tools they use in testing and debugging and whatever tools they use for documentation, and whatever collaboration tools they use with colleagues (zoom, whiteboards, coffee machines, etc.). Proportions will of course vary wildly.
I haven't measured the times for my own work, but at a vague guess I'd suppose I have perhaps 5 to 30 seconds of build time per hour on average during most development. Occasionally I'll have peaks where I am doing small changes, rebuilds and testing in quick succession, but even there the build times are very rarely a major time factor compared to testing time. (And that's with perhaps 500 files of C, C++ and headers.)