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


Groups > comp.lang.c > #136641

Re: software disenchantment

From David Brown <david.brown@hesbynett.no>
Newsgroups comp.lang.c
Subject Re: software disenchantment
Date 2018-10-11 16:38 +0200
Organization A noiseless patient Spider
Message-ID <ppnn96$m7e$1@dont-email.me> (permalink)
References (17 earlier) <32vvD.21117$134.7822@fx03.am4> <ppn5kf$clr$1@dont-email.me> <RVFvD.15651$I34.1016@fx43.am4> <ppneji$ke$1@dont-email.me> <7tIvD.18127$RM7.167@fx24.am4>

Show all headers | View raw


On 11/10/18 15:44, Bart wrote:
> 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.
> 

Let me repeat myself.  One of the intentions with the whole llvm system,
and the clang front end, was to make a compiler that was significantly
faster than gcc while being as powerful.  It failed there - it is not
hugely faster.  (It has been a very successful and useful project in
other respects.)

>> 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 are joking, right?

Tiny C is an interesting little project - it is not something you would
use for serious development work.  And, in case you hadn't guessed, it
is useless to me for the work I do.

> 
>>> 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?
> 

I can't comment on that.  Let those that think your compiler would be
good enough for them, stand up.

> 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.
> 

Your compiler won't compile my source code.  It will not work on my
targets.  It will not support the features I use in the language.  It
will not support the compiler-specific code (at least some of which will
work, through conditional compilation, with several major compilers for
the target).  It will not do the quality control or static analysis I
need.  It will not generate the additional output files I need, such as
stack usage analysis.  It will not support the language versions I need.
 It will not support the optimisations I need - in my world, too big or
too slow is a failure.  It will not give the debugging options I need.
It will not give the host support I need.  It will not give the
maintenance and future roadmap I need.  It will not give the support I need.

I am a /professional/.  My code needs to be high quality, and my company
needs to be able to stand behind the quality of their development
process and the code written.  I can't tell my customers "I ran this
through a compiler written by a guy off the internet.  I'm not sure if
the results are right - the guy doesn't really understand C and refuses
to look at the standards documents - but the build times were several
seconds faster than my old tools".

> 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?
> 
...
> 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...

Your first selection criteria is for features that give you correct
code, encourage readable and maintainable code, and help identify errors
as early as possible in the process.

Your second selection criteria is for efficient generated code.

If everything else is good enough, /then/ you can consider build times
as a third level of criteria.

If your tools are good enough you, that's great.  They are not good
enough for me.

> 
>>
>> 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.
> 

I don't care about what the OP's article says.  This is a discussion
between people in this group - the article may have inspired it, but the
author is not in this discussion.

I am no fan of unnecessary bloat.  But I am quite happy to accept that
some programs or systems are big, because most of it is useful to
someone even if it is not useful to /me/.  This is, I think, missing
from your perspective on software - you are only concerned about what
matters to /you/.  That's okay when you are writing your own compiler
that no one but you will ever use - it's a different matter when writing
tools to be used by lots of people.

>>> 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.
> 

As always, no one else cares about your personal tools.

It is a strange idea to use an assembly file as the intermediary format,
rather than object files.  I fully agree that assembling is a quick part
of the process - but it is still faster for a linker to use object files
than to use assembly files.

> 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'.
> 

My build system is to type "make".  It is quite simple.  It is vastly
more simple than to include the compiler options I need - plus all the
other programs involved in building.  (Build processes are often more
involved than just compile+link.)

The makefile, of course, contains a lot of information - but it is
flexible, re-usable, and highly reliable.  If you don't want to write
makefiles, there are alternative build systems that may be easier to
learn - there is no doubt that the makefile language is a little quirky.

Using a proper build system is not a bother.  I have used it for
decades, including for assembly and occasional other languages.

> 
>> 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?
> 

As I explained earlier, if you change a header you will have to
re-compile the files that include it (directly or indirectly).  And of
course if you change several C files between builds, they all need
re-compiled.  But if you have a regular re-build habit (and it's just
"ctrl-B" in an IDE), most of your builds will compile just one file.

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

Of course it might be smaller.  The average size tends towards bigger,
however.

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

Yes - and if you need to work on bigger projects, you'll find that every
scalability solution will involve incremental parallel builds.

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