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


Groups > comp.arch > #32170

Re: Here is what i think of C and C++

From Anonymous <no_email@invalid.invalid>
Newsgroups comp.arch
Subject Re: Here is what i think of C and C++
Date 2015-12-27 04:27 +0000
Message-ID <de97m0Fd8bgU1@mid.individual.net> (permalink)
References <n5mnne$kjv$6@dont-email.me> <fec45b86-9461-4bce-b8a3-0df45d49191f@googlegroups.com>

Show all headers | View raw


Rick C. Hodgin <rick.c.hodgin@gmail.com> wrote:
> C and C++ offer freedoms that gain performance.  It requires more
> i-dotting and t-crossing, but will produce code that is often 2x (or more)
> faster than Ada or other languages which impose such restrictions,

Nope.  See http://benchmarksgame.alioth.debian.org/u64q/ada.html

> even if they are good implementations.  Their strict type-checking
> rules require CPU time to implement.

My KDF9 emulator, in Ada  2012, runs about 2% faster with all checks
disabled
than it does with all checks enabled except in a small core set of
routines.

This is in part because the information-rich declarations of Ada allow the
compiler 
to optimise away checks that it can deduce will always succeed.  Also in
part because
many constructs are correct by construction and never need checks, e.g.:

subtype index is m..n; -- m, n are variables
a : array (index) of .....

for i in a'range loop 
   a(i) := ...;
end loop;

A subscripting error in a(i) is simply impossible.

The computer biz needs to seriously rethink its priorities.
Getting the wrong answer faster is not a selling point any more.

-- 
Bill Findlay

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


Thread

Here is what i think of C and C++ Ramine <ramine@1.1> - 2015-12-26 13:56 -0800
  Here is what i think of C and C++ "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-12-26 11:07 -0800
    Re: Here is what i think of C and C++ Quadibloc <jsavard@ecn.ab.ca> - 2015-12-26 12:17 -0800
      Re: Here is what i think of C and C++ jim.brakefield@ieee.org - 2015-12-26 16:31 -0800
        Re: Here is what i think of C and C++ "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-12-27 11:39 -0800
      Re: Here is what i think of C and C++ George Neuner <gneuner2@comcast.net> - 2015-12-28 14:16 -0500
    Re: Here is what i think of C and C++ Walter Banks <walter@bytecraft.com> - 2015-12-26 16:36 -0500
      Re: Here is what i think of C and C++ "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-12-26 14:14 -0800
        Re: Here is what i think of C and C++ Walter Banks <walter@bytecraft.com> - 2015-12-27 10:46 -0500
          Re: Here is what i think of C and C++ BGB <cr88192@hotmail.com> - 2015-12-27 09:50 -0600
          Re: Here is what i think of C and C++ "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-12-27 09:57 -0800
          Re: Here is what i think of C and C++ anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-27 17:43 +0000
            Re: Here is what i think of C and C++ Walter Banks <walter@bytecraft.com> - 2015-12-28 00:18 -0500
            Re: Here is what i think of C and C++ Walter Banks <walter@bytecraft.com> - 2015-12-28 00:30 -0500
    Re: Here is what i think of C and C++ Anonymous <no_email@invalid.invalid> - 2015-12-27 04:27 +0000
      Re: Here is what i think of C and C++ "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-12-27 09:44 -0800
      Re: Here is what i think of C and C++ EricP <ThatWouldBeTelling@thevillage.com> - 2015-12-27 16:35 -0500
    Re: Here is what i think of C and C++ Megol <golem960@gmail.com> - 2015-12-27 07:23 -0800

csiph-web