Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #136637

Re: software disenchantment

Subject Re: software disenchantment
Newsgroups comp.lang.c
References (16 earlier) <g27ccqFjb2cU7@mid.individual.net> <32vvD.21117$134.7822@fx03.am4> <ppn5kf$clr$1@dont-email.me> <RVFvD.15651$I34.1016@fx43.am4> <ppneji$ke$1@dont-email.me>
From Bart <bc@freeuk.com>
Message-ID <7tIvD.18127$RM7.167@fx24.am4> (permalink)
Organization virginmedia.com
Date 2018-10-11 14:44 +0100

Show all headers | View raw


On 11/10/2018 13:10, David Brown wrote:
> On 11/10/18 12:50, Bart wrote:

>> Look at the 'gold' linker, especially created from scratch to be more
>> efficient than 'ld'. Someone else who was dissatisfied with the status
>> quo and wasn't content just to buy a faster machine with more cores.
>>
> 
> Look at the "clang/llvm" compiler, created from scratch and intending to
> be faster than other compilers.

Not with llvm, which they will have known from the start would be a 
huge, cumbersome dependency.

> But by the time it reached a similar level of features to gcc, it
> has a similar run-time.  It turns out that a good compiler with strong
> optimisations, lots of features, powerful static analysis and warnings,
> and flexible support for targets simply takes a while to run.

There are workarounds. For example, you don't always need all that 
analysis and all the optimisation, you just want to make a small change, 
that might affect the whole program, and try it to see what happens.

To that end, the build system might simply employ Tiny C to do a quick 
and cheerful version suitable for building dozens of times in a short 
time, and then only use the big guns when all those other 'requirements' 
kick in.

>> You wouldn't. But it does what /I/ need. And it shows what /can/ be
>> done.
> 
> I am glad that your compiler does what /you/ need - and I am in no way
> disparaging the work you have done or the results you have achieved.
> But it does not compare to a top-class compiler, and it does not do what
> I need or want from a compiler.  It is thus utterly irrelevant to /me/.

Is what you want actually that typical?

My needs must be fairly atypical then. I just want to make a change to 
some source code, then create an executable so I can test those changes.

How it does that source -> executable step is of little interest, other 
than it shouldn't get in the way. I certainly don't want to hang around 
while it does it.

Is that really that unusual?

Take a program 'pc' that I want to try some changes on: 34 modules 
comprising 45Kloc, another 10Kloc in 16 source files, included as data.

This is not C, but rebuilding from scratch is like this (using the 
command line to demonstrate, usually it's done from an IDE):

   C:\qq>timeit "mm pc"
   MM Compiling pc.m to pc.exe
          mm pc 0.24

That's straight to x64, so let's try generating intermediate C, here 
done as two steps:

   C:\qq>timeit "mm -c64 pc"
   MM Compiling pc.m to pc.c
     mm -c64 pc 0.14

   C:\qq>timeit "bcc -exe pc"
   BCC Compiling pc.c to pc.exe
    bcc -exe pc 0.22

Total 0.36, but there is intermediate C source as well as intermediate 
ASM. But let's try that last step with gcc (warnings have been left out):

   C:\qq>timeit "gcc -opc.exe pc.c"
   gcc -opc.exe pc.c 3.80

Total now 3.94 seconds.

So successive solutions have taken 0.24 seconds or 0.36 seconds with 
mine, and 3.84 seconds with gcc, which is 10-15 times slower.

(And this is not even optimised. With -O2, it takes 11 seconds. -O3, 15 
seconds. There is no option here of incremental compiling or linking, 
since the C intermediate is a single file.)

So, which solution should I go for: the 0.25 seconds, 0.36 seconds, or 4 
seconds? Bear in the 4-second build runs 30% slower than the 0.25-second 
one. Very difficult choice...

> 
> It is like you telling me you have built a go-kart that can get you to
> your work and the shops, and is vastly more fuel efficient than my big,
> lumpy normal car.

No, I'd want to drive your big car to work and to the shops. So do many 
people. But according to the article in the OP, we are all gradually 
being forced to drive 40-ton trucks everywhere, and very complicated 
ones that no single person properly understands, with no choice.

>> Well, I've eliminated object files for most purposes. My build times
>> have improved. (Actually, I've eliminated them because they simply
>> weren't needed. They are replaced with .asm files.)
>>
> 
> Again, great for your little programs - useless for bigger ones.

Why? My assembler can assemble /and/ link at millions of lines per second.

SQLITE3 is a decent-sized library, and even with my poor code 
generation, it is only 240K lines of ASM. How big are we talking about?


>> Perhaps super-fast, super-efficient compiler tools are not going to
>> provide sub-one-second 'clean build' turnaround times for the some of
>> the giant projects presented here.
>>
>> But imagine if the underlying tools were even one magnitude faster? Your
>> parallel clean build would be faster than your incremental build, and it
>> wouldn't matter which files were modified. It would always be
>> consistently that speed.
>>
> 
> If the underlying compiler (and linker) was one magnitude faster, it
> would make the parallel clean build as fast as the current incremental
> build.  So what?  I would still use incremental builds - and that would
> then be faster still.

But then you don't need to bother. You can use a simpler, more reliable 
build system. Perhaps even Malcolm's 'gcc *.c'.


> And when the next project has twice as many files, the incremental build
> is still the same time - because it generally only compiles one file.

I don't believe this about only ever having to compile one file. Suppose 
you make a change to a header that is included everywhere else?

Nor about the next project always being bigger. Suppose it's smaller?

(And anyway there are ways of handling scalability of projects; I 
haven't needed do address that because mine are smallish.)

-- 
bart

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

software disenchantment Bart <bc@freeuk.com> - 2018-10-06 15:13 +0100
  Re: software disenchantment David Kleinecke <dkleinecke@gmail.com> - 2018-10-06 09:54 -0700
  Re: software disenchantment Thiago Adams <thiago.adams@gmail.com> - 2018-10-06 10:26 -0700
    Re: software disenchantment fir <profesor.fir@gmail.com> - 2018-10-14 04:26 -0700
  Re: software disenchantment antispam@math.uni.wroc.pl - 2018-10-09 18:20 +0000
    Re: software disenchantment David Kleinecke <dkleinecke@gmail.com> - 2018-10-09 11:54 -0700
      Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-09 21:22 +0100
        Re: software disenchantment David Kleinecke <dkleinecke@gmail.com> - 2018-10-09 17:47 -0700
          Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-10 11:28 +0100
            Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-10 11:38 +0100
              Re: software disenchantment Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-10-10 05:49 -0700
                Re: software disenchantment David Brown <david.brown@hesbynett.no> - 2018-10-10 15:47 +0200
                Re: software disenchantment "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-10 09:58 -0400
                Re: software disenchantment scott@slp53.sl.home (Scott Lurndal) - 2018-10-10 14:39 +0000
                Re: software disenchantment Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-10-10 09:42 -0700
                Re: software disenchantment "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-10 13:18 -0400
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-10 20:31 +0100
                Re: software disenchantment BGB <cr88192@hotmail.com> - 2018-10-10 17:53 -0500
                Re: software disenchantment Wouter Verhelst <w@uter.be> - 2018-10-11 10:06 +0200
                Re: software disenchantment Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-10-11 02:34 -0700
                Re: software disenchantment Wouter Verhelst <w@uter.be> - 2018-10-11 12:03 +0200
                Re: software disenchantment Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-10-11 03:59 -0700
                Re: software disenchantment Wouter Verhelst <w@uter.be> - 2018-10-11 16:56 +0200
                Re: software disenchantment Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-10-11 09:02 -0700
                Re: software disenchantment Wouter Verhelst <w@uter.be> - 2018-10-11 19:39 +0200
                Re: software disenchantment Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-10-15 19:53 +0000
                Re: software disenchantment BGB <cr88192@hotmail.com> - 2018-10-16 03:54 -0500
                Re: software disenchantment David Brown <david.brown@hesbynett.no> - 2018-10-11 20:25 +0200
                Re: software disenchantment scott@slp53.sl.home (Scott Lurndal) - 2018-10-11 13:16 +0000
                Re: software disenchantment Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-10-11 07:15 -0700
                Re: software disenchantment Wouter Verhelst <w@uter.be> - 2018-10-11 17:05 +0200
                Re: software disenchantment Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-10-11 09:15 -0700
                Re: software disenchantment scott@slp53.sl.home (Scott Lurndal) - 2018-10-11 17:33 +0000
                Re: software disenchantment Wouter Verhelst <w@uter.be> - 2018-10-11 19:53 +0200
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-11 17:59 +0100
                Re: software disenchantment nobody@example.org (Scott) - 2018-10-10 16:53 +0000
                Re: software disenchantment BGB <cr88192@hotmail.com> - 2018-10-10 12:45 -0500
                Re: software disenchantment Thiago Adams <thiago.adams@gmail.com> - 2018-10-10 11:04 -0700
                Re: software disenchantment BGB <cr88192@hotmail.com> - 2018-10-10 14:22 -0500
                Re: software disenchantment "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-10 15:53 -0400
                Re: software disenchantment Ian Collins <ian-news@hotmail.com> - 2018-10-11 09:06 +1300
                Re: software disenchantment "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-10 13:21 -0700
                Re: software disenchantment scott@slp53.sl.home (Scott Lurndal) - 2018-10-10 20:27 +0000
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-10 22:54 +0100
                Re: software disenchantment Ian Collins <ian-news@hotmail.com> - 2018-10-11 11:01 +1300
                Re: software disenchantment Ian Collins <ian-news@hotmail.com> - 2018-10-11 11:05 +1300
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-10 23:16 +0100
                Re: software disenchantment Ian Collins <ian-news@hotmail.com> - 2018-10-11 11:22 +1300
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-10 23:28 +0100
                Re: software disenchantment Ian Collins <ian-news@hotmail.com> - 2018-10-11 11:33 +1300
                Re: software disenchantment David Brown <david.brown@hesbynett.no> - 2018-10-11 11:37 +0200
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-11 11:50 +0100
                Re: software disenchantment David Brown <david.brown@hesbynett.no> - 2018-10-11 14:10 +0200
                Re: software disenchantment Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-10-11 05:24 -0700
                Re: software disenchantment David Brown <david.brown@hesbynett.no> - 2018-10-11 15:12 +0200
                Re: software disenchantment scott@slp53.sl.home (Scott Lurndal) - 2018-10-11 13:13 +0000
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-11 14:44 +0100
                Re: software disenchantment David Brown <david.brown@hesbynett.no> - 2018-10-11 16:38 +0200
                Re: software disenchantment mark.bluemel@gmail.com - 2018-10-11 08:09 -0700
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-11 17:43 +0100
                Re: software disenchantment scott@slp53.sl.home (Scott Lurndal) - 2018-10-11 17:36 +0000
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-11 18:56 +0100
                Re: software disenchantment Keith Thompson <kst-u@mib.org> - 2018-10-11 11:54 -0700
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-11 20:09 +0100
                Re: software disenchantment scott@slp53.sl.home (Scott Lurndal) - 2018-10-12 13:10 +0000
                Re: software disenchantment David Brown <david.brown@hesbynett.no> - 2018-10-13 12:57 +0200
                Re: software disenchantment BGB <cr88192@hotmail.com> - 2018-10-11 14:27 -0500
                Re: software disenchantment David Brown <david.brown@hesbynett.no> - 2018-10-11 22:03 +0200
                Re: software disenchantment BGB <cr88192@hotmail.com> - 2018-10-11 15:56 -0500
                Re: software disenchantment David Brown <david.brown@hesbynett.no> - 2018-10-12 11:30 +0200
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-11 23:34 +0100
                Re: software disenchantment Keith Thompson <kst-u@mib.org> - 2018-10-11 16:24 -0700
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-12 01:46 +0100
                Re: software disenchantment Keith Thompson <kst-u@mib.org> - 2018-10-11 18:58 -0700
                Re: software disenchantment Wouter Verhelst <w@uter.be> - 2018-10-12 08:50 +0200
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-12 11:12 +0100
                Re: software disenchantment David Brown <david.brown@hesbynett.no> - 2018-10-12 12:55 +0200
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-12 12:10 +0100
                Re: software disenchantment David Brown <david.brown@hesbynett.no> - 2018-10-12 13:29 +0200
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-12 13:06 +0100
                Re: software disenchantment David Brown <david.brown@hesbynett.no> - 2018-10-12 14:30 +0200
                Re: software disenchantment James Kuyper <jameskuyper@alumni.caltech.edu> - 2018-10-12 08:53 -0400
                Re: software disenchantment David Brown <david.brown@hesbynett.no> - 2018-10-12 15:11 +0200
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-12 13:55 +0100
                Re: software disenchantment David Brown <david.brown@hesbynett.no> - 2018-10-12 15:13 +0200
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-12 16:10 +0100
                Re: software disenchantment scott@slp53.sl.home (Scott Lurndal) - 2018-10-12 15:22 +0000
                Re: software disenchantment Keith Thompson <kst-u@mib.org> - 2018-10-12 09:12 -0700
                Re: software disenchantment David Brown <david.brown@hesbynett.no> - 2018-10-13 13:00 +0200
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-13 12:52 +0100
                Re: software disenchantment Ian Collins <ian-news@hotmail.com> - 2018-10-14 08:44 +1300
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-13 21:03 +0100
                Re: software disenchantment Ian Collins <ian-news@hotmail.com> - 2018-10-14 10:13 +1300
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-13 23:02 +0100
                Re: software disenchantment Keith Thompson <kst-u@mib.org> - 2018-10-13 16:47 -0700
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-14 01:05 +0100
                Re: software disenchantment David Kleinecke <dkleinecke@gmail.com> - 2018-10-13 18:12 -0700
                Re: software disenchantment Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-10-14 03:05 +0100
                Re: software disenchantment David Brown <david.brown@hesbynett.no> - 2018-10-14 20:14 +0200
                Re: software disenchantment Thiago Adams <thiago.adams@gmail.com> - 2018-10-14 11:25 -0700
                Re: software disenchantment scott@slp53.sl.home (Scott Lurndal) - 2018-10-12 13:17 +0000
                Re: software disenchantment scott@slp53.sl.home (Scott Lurndal) - 2018-10-12 13:16 +0000
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-12 14:36 +0100
                Re: software disenchantment scott@slp53.sl.home (Scott Lurndal) - 2018-10-12 14:25 +0000
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-12 15:55 +0100
                Re: software disenchantment scott@slp53.sl.home (Scott Lurndal) - 2018-10-12 15:22 +0000
                Re: software disenchantment Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-10-12 08:26 -0700
                Re: software disenchantment scott@slp53.sl.home (Scott Lurndal) - 2018-10-12 15:51 +0000
                Re: software disenchantment David Brown <david.brown@hesbynett.no> - 2018-10-13 13:06 +0200
                Re: software disenchantment Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-10-15 19:30 +0000
                Re: software disenchantment David Brown <david.brown@hesbynett.no> - 2018-10-12 12:39 +0200
                Re: software disenchantment Wouter Verhelst <w@uter.be> - 2018-10-12 08:44 +0200
                Re: software disenchantment David Brown <david.brown@hesbynett.no> - 2018-10-12 13:01 +0200
                Re: software disenchantment David Brown <david.brown@hesbynett.no> - 2018-10-11 20:41 +0200
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-11 20:02 +0100
                Re: software disenchantment David Brown <david.brown@hesbynett.no> - 2018-10-11 22:13 +0200
                Re: software disenchantment BGB <cr88192@hotmail.com> - 2018-10-11 13:03 -0500
                Re: software disenchantment "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-10-11 11:33 -0700
                Re: software disenchantment David Brown <david.brown@hesbynett.no> - 2018-10-11 21:04 +0200
                Re: software disenchantment BGB <cr88192@hotmail.com> - 2018-10-11 20:15 -0500
                Re: software disenchantment David Brown <david.brown@hesbynett.no> - 2018-10-12 13:17 +0200
                Re: software disenchantment scott@slp53.sl.home (Scott Lurndal) - 2018-10-11 13:10 +0000
                Re: software disenchantment BGB <cr88192@hotmail.com> - 2018-10-10 19:22 -0500
                Re: software disenchantment David Brown <david.brown@hesbynett.no> - 2018-10-11 10:58 +0200
                Re: software disenchantment Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-10-11 02:37 -0700
                Re: software disenchantment Wouter Verhelst <w@uter.be> - 2018-10-11 12:06 +0200
                Re: software disenchantment Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-10-11 04:00 -0700
                Re: software disenchantment Cecil Bayona <cbayona@cbayona.com> - 2018-10-11 13:03 -0500
                Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-11 19:36 +0100
                Re: software disenchantment Cecil Bayona <cbayona@cbayona.com> - 2018-10-11 15:37 -0500
                Re: software disenchantment Thiago Adams <thiago.adams@gmail.com> - 2018-10-10 14:01 -0700
        Re: software disenchantment Ian Collins <ian-news@hotmail.com> - 2018-10-11 09:02 +1300
      Re: software disenchantment Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-10-10 19:11 +0000
        Re: software disenchantment David Kleinecke <dkleinecke@gmail.com> - 2018-10-10 13:08 -0700
          Re: software disenchantment Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-10-11 14:52 +0000
            Re: software disenchantment scott@slp53.sl.home (Scott Lurndal) - 2018-10-11 14:58 +0000
            Re: software disenchantment Wouter Verhelst <w@uter.be> - 2018-10-11 17:19 +0200
              Re: software disenchantment Dan Purgert <dan@djph.net> - 2018-10-12 09:49 +0000
                Re: software disenchantment Wouter Verhelst <w@uter.be> - 2018-10-13 09:30 +0200
                Re: software disenchantment Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-10-15 08:53 +0000
                Re: software disenchantment Dan Purgert <dan@djph.net> - 2018-10-15 09:44 +0000
    Re: software disenchantment Jens Stuckelberger <Jens_Stuckelberger@nowhere.net> - 2018-10-10 13:36 +0000
  Re: software disenchantment "Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid> - 2018-10-10 13:51 -0700
    Re: software disenchantment nobody@example.org (Scott) - 2018-10-11 01:53 +0000
    Re: software disenchantment Dan Purgert <dan@djph.net> - 2018-10-11 10:20 +0000
    Re: software disenchantment Bart <bc@freeuk.com> - 2018-10-11 12:53 +0100
      Re: software disenchantment "Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid> - 2018-10-11 23:18 -0700

csiph-web