The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Steffen Nurpmeso <steffen@sdaoden.eu>
To: "Theodore Y. Ts'o" <tytso@mit.edu>
Cc: tuhs@minnie.tuhs.org
Subject: Re: [TUHS] PDP-11 legacy, C, and modern architectTures
Date: Thu, 28 Jun 2018 16:36:35 +0200	[thread overview]
Message-ID: <20180628143635.7UYJ_%steffen@sdaoden.eu> (raw)
In-Reply-To: <20180627021843.GA31920@thunk.org>

Theodore Y. Ts'o wrote in <20180627021843.GA31920@thunk.org>:
  ...
 |There is at least one of his points that I very much agree with, which
 |is the abstract model which is exported by the C programming paradigm
 |is very different from what totality of what the CPU can do.  Consider
 ...
 |That saying is essentially telling us that the compiler is capable of
 |doing a lot of things behinds our back (which goes against the common
 |understanding of what low-level language does), and second, that
 |modern CPU's has gotten too complicated for most humans to be able to
 |program directly, either comfortably or practically.
 ...
 |It's very easy to criticize Intel for engineering their CPU's the way
 |they did, but if you want to know who to blame for massively high
 |ILP's and caching, and compilers that do all sorts of re-ordering and
 |loop rewriting behind the developer's back, just look in the mirror.
 |It's the same as why we have climate change and sea level rise.
 |
 |"We have met the enemy and he is us". -- Pogo (Walt Kelly)

And my thinking is that the C language has been misused.  If you
can cast in stone a language policy that then allows compilers to
apply optimization X, and it gains your product ten percent
performance without the necessity to spend a single minute payed
manpower.

But even otherwise.  For example loop unrolling -- how could
a compiler know whether i want a loop to become unrolled or not?
It may have very clever heuristics, but despite that these have to
become coded themselves, they will not know whether i have the
desire to make this piece of code fast or not, shall it ever
execute.

In my opinion this "giving away decisions to the compiler" made
the C language worse, not better.  I think it would be better if
one could place attributes, like @unroll, @inline (since inline is
only a hint and placing not-to-be-inlined after their use cases
does not matter to intelligent CCs: @no-inline would be needed),
@prefetch[[X]], and @parallel.  And @align[[X]] and all these.
"@parallel @unroll for(;;)" could for example automatically split
a loop into X subranges.  Or it could hint secure prediction.  Or
at least indicate the programmer's intention or clearance of that,
if the hardware is capable.  And a good compiler could indicate
whether the desire could ever be fulfilled or not.  This looks
like the Julia language, but there these are user-defined "macros"
not compiler hints.  I mean, at least until quantum computers
happen C seems to map to what i know about hardware pretty good.
It is up to the programmer to localize data and avoid that threads
trumple on each other.  It is not so easy as if the language
offers a completely asynchronous shot with a single operator, but
in an ideal world you can get the same with a much smaller
footprint.

Unfortunately what you say seems to be right, and recalling what
the largest German computer magazine had to say about compilers,
it was mostly a series of graphs indicating the speed of the
generated code.  Whereas i had to deal with working around
compiler bugs for the same (free) CCs at the same time.  (Of
course, or maybe not of course, people did care to get them fixed,
but the story was not about "the walk", but what the eagles saw.)
There were two or three large interesting articles with quite some
context (except Mr. Stiller's "Prozessorgeflüster"; i recall he
once won a bottle of wine from some Intel manager), about at the
same time, one about the ARM architecture, one accompanying Donald
Knuth's 64th birthday regarding MMIX, and if you want one about
Smalltalk.  And indeed most think it is all about education,
despite the fact that each epoch seems to end regardless what you.
It has always been the fight to make people reflect, realize, and
be good with it.

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

  parent reply	other threads:[~2018-06-28 14:36 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-26 17:54 [TUHS] PDP-11 legacy, C, and modern architectures Nelson H. F. Beebe
2018-06-26 18:03 ` Cornelius Keck
2018-06-26 21:21   ` Nelson H. F. Beebe
2018-06-26 21:56   ` Kurt H Maier
2018-06-26 18:52 ` Ronald Natalie
2018-06-26 19:01 ` Ronald Natalie
2018-06-26 21:16   ` Arthur Krewat
2018-06-26 21:50     ` Larry McVoy
2018-06-26 21:54       ` Ronald Natalie
2018-06-26 21:59         ` Larry McVoy
2018-06-26 22:20           ` Bakul Shah
2018-06-26 22:33             ` Arthur Krewat
2018-06-26 23:53               ` Bakul Shah
2018-06-27  8:30             ` Tim Bradshaw
2018-06-26 22:33           ` Andy Kosela
2018-06-27  0:11             ` Bakul Shah
2018-06-27  6:10               ` arnold
2018-06-27  2:18           ` [TUHS] PDP-11 legacy, C, and modern architectTures Theodore Y. Ts'o
2018-06-27  2:22             ` Theodore Y. Ts'o
2018-06-28 14:36             ` Steffen Nurpmeso [this message]
2018-06-27 11:26         ` [TUHS] PDP-11 legacy, C, and modern architectures Tony Finch
2018-06-27 14:33           ` Clem Cole
2018-06-27 14:38             ` Clem Cole
2018-06-27 15:30             ` Paul Winalski
2018-06-27 16:55               ` Tim Bradshaw
2018-06-27  6:27     ` arnold
2018-06-27 16:00 ` Steve Johnson
2018-06-28  4:12   ` Bakul Shah
2018-06-28 14:15     ` Theodore Y. Ts'o
2018-06-28 14:40       ` Larry McVoy
2018-06-28 14:55         ` Perry E. Metzger
2018-06-28 14:58           ` Larry McVoy
2018-06-28 15:39             ` Tim Bradshaw
2018-06-28 16:02               ` Larry McVoy
2018-06-28 16:41                 ` Tim Bradshaw
2018-06-28 16:59                   ` Paul Winalski
2018-06-28 17:09                   ` Larry McVoy
2018-06-29 15:32                     ` tfb
2018-06-29 16:09                       ` Perry E. Metzger
2018-06-29 17:51                       ` Larry McVoy
2018-06-29 18:27                         ` Tim Bradshaw
2018-06-29 19:02                         ` Perry E. Metzger
2018-06-28 20:37                 ` Perry E. Metzger
2018-06-28 15:37         ` Clem Cole
2018-06-28 20:37           ` Lawrence Stewart
2018-06-28 14:43       ` Perry E. Metzger
2018-06-28 14:56         ` Larry McVoy
2018-06-28 15:07           ` Warner Losh
2018-06-28 19:42           ` Perry E. Metzger
2018-06-28 19:55             ` Paul Winalski
2018-06-28 20:42             ` Warner Losh
2018-06-28 21:03               ` Perry E. Metzger
2018-06-28 22:29                 ` Theodore Y. Ts'o
2018-06-29  0:18                   ` Larry McVoy
2018-06-29 15:41                     ` Perry E. Metzger
2018-06-29 18:01                       ` Larry McVoy
2018-06-29 19:07                         ` Perry E. Metzger
2018-06-29  5:58                   ` Michael Kjörling
2018-06-28 20:52             ` Lawrence Stewart
2018-06-28 21:07               ` Perry E. Metzger
2018-06-28 16:45       ` Paul Winalski
2018-06-28 20:47         ` Perry E. Metzger
2018-06-29 15:43         ` emanuel stiebler
2018-06-29  2:02       ` Bakul Shah
2018-06-29 12:58         ` Theodore Y. Ts'o
2018-06-29 18:41           ` Perry E. Metzger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180628143635.7UYJ_%steffen@sdaoden.eu \
    --to=steffen@sdaoden.eu \
    --cc=tuhs@minnie.tuhs.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).