From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,97482af7429a6a62 X-Google-Attributes: gid109fba,public X-Google-Thread: 10d15b,97482af7429a6a62 X-Google-Attributes: gid10d15b,public X-Google-Thread: 103376,97482af7429a6a62 X-Google-Attributes: gid103376,public From: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Re: Language Efficiency Date: 1995/04/05 Message-ID: <1995Apr5.193652.9588@eisner.decus.org>#1/1 X-Deja-AN: 100937594 references: <3lmt64$stt@dplanet.p2k.cbis.com> <3lsdnf$t6o@rational.rational.com> organization: LJK Software newsgroups: comp.lang.c++,comp.lang.ada,comp.lang.cobol Date: 1995-04-05T00:00:00+00:00 List-Id: In article , mrw@oasis.icl.co.uk (Mike Wilson) writes: > Yes, but I could generalise and say that some languages such as 'C' > were designed with efficiency in mind. That's not to say a rotten > compiler wouldn't produce huge, slow code. There _are_ very efficient > COBOL compilers around. I've heard ICL's VME COBOL compiler produces > very efficient code (but I don't have any first-hand knowledge of it). Actually, as I understand it efficiency works the other way around. As a low level language, C lets a programmer considerably affect the generated code when a non-optimizing compiler is used. Switch to a different compiler or move to a different instruction set and what was formerly optimal is no longer optimal. Likewise, if you use optimizing compilers high level languages will produce better results than C. Obviously the lowest level languages processors which directly express machine instructions to be used leave the least opportunity for any optimization of what the programmer has provided. (Although for Alpha VMS, DEC did have to build a compiler for the VAX assembly language, and I think there is at least one optimization which can be enabled.) Larry Kilgallen