From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sun, 17 Jul 2011 12:02:45 +0200 From: tlaronde@polynum.com To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-ID: <20110717100245.GA2352@polynum.com> References: <0a7dc5268ce4dceb21ea20cdcc191693@terzarima.net> <27544caa847ff61fed1ae5f4d87218d0@ladd.quanstro.net> <20110717073847.GB539@polynum.com> <20110717084411.95552B827@mail.bitblocks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110717084411.95552B827@mail.bitblocks.com> User-Agent: Mutt/1.4.2.3i Subject: Re: [9fans] NUMA Topicbox-Message-UUID: 031be166-ead7-11e9-9d60-3106f5b1d025 On Sun, Jul 17, 2011 at 01:44:11AM -0700, Bakul Shah wrote: > On Sun, 17 Jul 2011 09:38:47 +0200 tlaronde@polynum.com wrote: > > > > Furthermore, I don't know for others, but I prefer correctness over > > speed. I mean, if a program is proved to be correct (and very few are), > > complex acrobatics from the compiler, namely in the "optimization" area, > > able to wreak havoc all the code assumptions, is something I don't buy. > > C's design has compromises in favor of speed to correctness > (mainly by underspecifying, by leaving more things upto the > implementor). So if you really prefer correctness over speed, > you should be using Scheme, ML or Haskell etc but not C! Yes and no. IMHO one of the greatest strengths of C is that the language is small (standard lib is apart) and its description short and to the point. K&R and, at least, ANSI C were short and if there are subtleties (promotions... signed/unsigned etc.), knowing what is guaranteed and what is not can be achieved. (And C is a general purpose language, but not an all purposes language [standard C]: calculus is not its realm, since even integer overflow is unspecified.) My woe is more that an optimization can say "this may improve speed (or may not, even slow down processing...)": OK. But an optimization that can break a program, that is an optimization whose correctness is not guaranteed, is something I can't understand why it is even proposed (since I fail to see why someone would be happy to have more rapidly an incorrect result, that can even not be said to be close to the correct one for some epsilon...). >[...] > Also note that the ISA implementations these days are quite > complex (perhaps even more than your typical program). We > don't see this complexty because it is all hidden behind a > relatively simple ISA. But remember the FOOF bug? Usually the > vendor has a long errata list (typically only available on a > need to know basis and only under NDA!). And usually they > don't formally prove the implementation right; they just run > zillions of test vectors! I bet you would be scandalized if > you knew what they do :-) Scandalized, perhaps... surprised: not! Because stating explicitely the domain of definition of operations on not integer, not scaled and certainly not "reals" is not trivial at all precisely by lack of uniformity, specially on a higher level when you consider not one manipulation, but a sequence... And the the decreasing size of the hardware components will lead to impredictability by design! >[...] > I seriously think you will be happier with Scheme! That's on my TODO list. Since a long time now... ;) -- Thierry Laronde http://www.kergis.com/ Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C