comp.lang.ada
 help / color / mirror / Atom feed
From: Richie Bielak <richieb@calfp.com>
Subject: Assembler most efficient??? (was Re: What is wrong with OO ?)
Date: 1997/01/10
Date: 1997-01-10T00:00:00+00:00	[thread overview]
Message-ID: <32D6C18B.30A8@calfp.com> (raw)
In-Reply-To: dewar.852912391@merv


Robert Dewar wrote:
> 
> "> Assembler will ALWAYS be the most efficient language.  The more you
> > abstract the problem, the more you "generalize" the solution to a
> > given problem, the more you necessarily give up in efficiency.  C
> > takes a minimal 3x hit on integer arithmetic, 10x on more complex
> > stuff; and OO, because of the overhead interpreting where
> > to send things, is 10x on top of that."
> 
> First, it is only true that assembler is most efficient if written by
> a competent programmer. Since well over 90% of the assembly language
> that I have seen is highly incompetent, this is an important criterion.
> In particular, I often see the phenomenon of super ferocious, super
> tight coding of junk algorithms, and the result can easily be beaten
> by a decent algorithm written in any language.
> 

[...]

I agree with Robert 100%. In John Bentley's book "Programming Pearls"
there is a neat example of this. He shows a program written in BASIC
on a TRS-80 and a program written in FORTRAN on a Cray. The BASIC
program used a linear algorithm and the FORTRAN program used
a quadratic algorithm to solve the same problem. When the size
of problem got to about 10,000 the TRS-80 beat the Cray.

Part of the difficulty compilers have with generating good code
is that CPUs are being designed by people who coded in assembler
and never had to write a compiler. Niklaus Wirth's Lilith computer
was an example of a CPU designed with a compiler in mind. He has
written a bunch of articles comparing the performance of his
Modula-2 compilers on Lilith and the MC68000 (see past issues of CACM 
- about 10 years ago?). The Lilith outperformed most computers
in its class and it didn't have an assembler.

Compilers can be much smarter than programmers in generating
machine code, especially on some of these pipe-lined RISC CPUs.

...richie


* richieb@netlabs.net       - at home |  Richie Bielak             *
* richieb@calfp.com         - at work |                            *
*          Home page:   http://www.netlabs.net/hp/richieb          *
*        "Fight software piracy, use free software!" (me)          *




  reply	other threads:[~1997-01-10  0:00 UTC|newest]

Thread overview: 209+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-12-03  0:00 What is wrong with OO ? Ahmed
1996-12-03  0:00 ` Fred Parker
1996-12-03  0:00 ` Bill Gooch
1996-12-03  0:00   ` Bill Gooch
1996-12-04  0:00   ` Ahmed
1996-12-04  0:00     ` Bill Gooch
1996-12-06  0:00       ` Jeff Miller
1996-12-06  0:00         ` Bill Gooch
1996-12-14  0:00         ` Chris
1996-12-06  0:00       ` Ahmed
1996-12-06  0:00         ` Bill Gooch
1996-12-04  0:00 ` Matthew Gream
1996-12-05  0:00   ` Tim Ottinger
1996-12-04  0:00 ` Harry Protoolis
1996-12-04  0:00   ` Roger T.
1996-12-04  0:00   ` Joe Winchester
1996-12-05  0:00     ` Russell Corfman
1996-12-04  0:00   ` Ahmed
1996-12-06  0:00     ` Harry Protoolis
1996-12-06  0:00       ` Ralph Cook
1996-12-07  0:00         ` Harry Protoolis
1996-12-09  0:00           ` Nigel Tzeng
1996-12-12  0:00             ` David Bradley
1996-12-20  0:00               ` Nigel Tzeng
     [not found]         ` <1996Dec7.151850.877@prim.demon.co.uk>
1996-12-08  0:00           ` Tansel Ersavas
1996-12-14  0:00             ` Kazimir Majorinc
1996-12-14  0:00               ` Tansel Ersavas
1996-12-14  0:00               ` Jeff Miller
1996-12-16  0:00                 ` David Bradley
1996-12-15  0:00               ` Todd Hoff
1996-12-15  0:00                 ` Tansel Ersavas
1996-12-15  0:00                 ` Patrick Ma
1996-12-16  0:00                   ` Robert C. Martin
1996-12-16  0:00                   ` Bob Kettig
1996-12-20  0:00               ` The Impossible Project: not so funny... (Was: what's wrong) Tim Ottinger
1996-12-20  0:00                 ` Robert Dewar
1996-12-21  0:00                 ` John DiCamillo
1996-12-22  0:00                 ` Guy Rixon
1996-12-22  0:00     ` Chip Richards
1996-12-04  0:00   ` What is wrong with OO ? Robert C. Martin
1996-12-04  0:00     ` Dr. Richard Botting
1996-12-05  0:00     ` Tom Bushell
1996-12-05  0:00       ` Piercarlo Grandi
1996-12-06  0:00         ` Tom Bushell
1996-12-06  0:00           ` David Bradley
1996-12-08  0:00           ` Piercarlo Grandi
1996-12-10  0:00             ` Todd Hoff
1996-12-11  0:00               ` Nick Leaton
1996-12-11  0:00               ` Nick Leaton
1996-12-11  0:00                 ` Matt Kennel
1996-12-12  0:00                 ` Piercarlo Grandi
1996-12-10  0:00             ` Piercarlo Grandi
1996-12-11  0:00             ` Tom Bushell
1996-12-05  0:00       ` Marnix Klooster
1996-12-06  0:00       ` Mukesh Prasad
1996-12-10  0:00         ` Tom Bushell
1996-12-06  0:00       ` Harry Protoolis
1996-12-10  0:00         ` Tom Bushell
1996-12-06  0:00       ` Roger Vossler
1996-12-10  0:00         ` Tom Bushell
1996-12-10  0:00           ` Roger Vossler
1996-12-12  0:00             ` Tom Bushell
1996-12-12  0:00             ` Don Harrison
1996-12-11  0:00           `  Todd Knarr 
1996-12-11  0:00             ` Alan Meyer
1996-12-12  0:00             ` Ell
1996-12-12  0:00             ` Tom Bushell
     [not found]             ` <58mubr$i <58p5ou$dkm@news3.digex.net>
1996-12-13  0:00               ` Nick Leaton
1996-12-25  0:00                 ` Weiqi Gao
1996-12-25  0:00                   ` Matthew S. Whiting
1996-12-26  0:00                   ` Mike Rubenstein
1996-12-26  0:00                   ` Bob Jarvis
1996-12-26  0:00                     ` Arthur Gold
     [not found]             ` <32aefdb0..406273038@news.nstn.ca>
1996-12-14  0:00               ` "Paul E. Bennett"
1996-12-06  0:00       ` David B. Shapcott [C]
1996-12-06  0:00       ` Carl Weidling
1996-12-05  0:00     ` Piercarlo Grandi
1996-12-04  0:00 ` Robert C. Martin
1996-12-04  0:00 ` Piercarlo Grandi
1996-12-05  0:00 ` Nick Thurn
1996-12-05  0:00 ` Daniel Drasin
1996-12-06  0:00   ` Todd Hoff
1996-12-07  0:00     ` Steve Heller
1996-12-07  0:00       ` Tansel Ersavas
1996-12-09  0:00         ` Kenneth Mays
1996-12-14  0:00         ` Robert C. Martin
1996-12-14  0:00           ` Patrick Ma
1996-12-18  0:00             ` Harry Protoolis
1996-12-18  0:00               ` Patrick Ma
1996-12-18  0:00                 ` Caitlin
1996-12-15  0:00           ` Tansel Ersavas
1996-12-17  0:00             ` Adam Beneschan
1996-12-17  0:00               ` Tansel Ersavas
1996-12-18  0:00                 ` Adam Beneschan
1996-12-18  0:00                 ` Ralph Cook
1996-12-19  0:00                 ` Nick Leaton
1996-12-19  0:00                 ` Robert C. Martin
1996-12-20  0:00                   ` Tansel Ersavas
1996-12-21  0:00                     ` Michael Malak
1996-12-17  0:00             ` Adam Beneschan
1996-12-17  0:00               ` Ralph Cook
1996-12-18  0:00               ` Tansel Ersavas
1996-12-17  0:00             ` Robert Dewar
1996-12-18  0:00               ` Tansel Ersavas
1996-12-27  0:00                 ` clovis
1996-12-27  0:00                   ` Jacqueline U. Robertson
1996-12-27  0:00                     ` Tore Lund
1996-12-28  0:00                       ` Tansel Ersavas
1996-12-28  0:00                         ` Tore Lund
1996-12-31  0:00                         ` Adam Beneschan
1996-12-31  0:00                           ` clovis
1996-12-31  0:00                             ` Tansel Ersavas
1996-12-31  0:00                             ` Neville Black
1997-01-01  0:00                             ` Tom Bushell
1997-01-10  0:00                             ` Bart Samwel
1997-01-10  0:00                               ` Robert Dewar
1997-01-10  0:00                                 ` Richie Bielak [this message]
1997-01-11  0:00                                   ` Assembler most efficient??? (was Re: What is wrong with OO ?) Robert Dewar
1997-01-11  0:00                                     ` James S. Rogers
1997-01-11  0:00                                     ` Larry Kilgallen
1997-01-12  0:00                                       ` Joel VanLaven
1997-01-13  0:00                                     ` Richie Bielak
1997-01-15  0:00                                 ` What is wrong with OO ? Richard Kenner
1997-01-11  0:00                               ` Randy A. Ynchausti
1997-01-12  0:00                               ` Piercarlo Grandi
1996-12-31  0:00                           ` Robert C. Martin
1996-12-29  0:00                       ` clovis
1996-12-31  0:00                         ` Tom Bushell
1996-12-31  0:00                           ` clovis
1997-01-10  0:00                           ` Bart Samwel
1996-12-31  0:00                       ` Jon S Anthony
1997-01-01  0:00                       ` Jon S Anthony
1997-01-12  0:00                       ` Corey Minyard
1997-01-14  0:00                         ` Vos nom et pr�nom
1997-01-13  0:00                       ` Nick Thurn
1996-12-28  0:00                     ` clovis
1996-12-30  0:00                       ` John (Max) Skaller
1996-12-29  0:00                         ` Rosimildo da Silva
1996-12-31  0:00                         ` Ian Joyner
1997-01-03  0:00                       ` markj
1997-01-03  0:00                         ` Natan
1996-12-27  0:00                   ` Tore Lund
1996-12-28  0:00                     ` clovis
1996-12-28  0:00                       ` Tore Lund
1996-12-28  0:00                   ` Stephen Pendleton
1996-12-31  0:00                     ` Edward de Jong
1996-12-31  0:00                       ` Nick Leaton
1996-12-31  0:00                       ` clovis
1997-01-01  0:00                       ` Tore Lund
1997-01-01  0:00                         ` Tore Lund
1996-12-19  0:00               ` Robert C. Martin
1996-12-24  0:00             ` Nigel Tzeng
1996-12-26  0:00               ` Tansel Ersavas
1996-12-26  0:00                 ` Bill Gooch
1996-12-16  0:00           ` Karen A. Morrissey
1996-12-16  0:00             ` Bob Kettig
1996-12-17  0:00               ` Robert Dewar
1996-12-17  0:00             ` David Bradley
1996-12-09  0:00       ` Todd Hoff
1996-12-10  0:00         ` Steve Heller
1996-12-10  0:00         ` Snowball queries
1996-12-12  0:00         ` Samuel S. Shuster
1996-12-12  0:00           ` Dr. Richard Botting
1996-12-13  0:00           ` Nick Leaton
1996-12-16  0:00             ` Samuel S. Shuster
1996-12-16  0:00               ` Bob Kettig
1996-12-16  0:00                 ` Robert Dewar
1996-12-17  0:00               ` Tansel Ersavas
1996-12-18  0:00                 ` Tom Bushell
1996-12-18  0:00                   ` Matt Kennel
1996-12-18  0:00                     ` Tansel Ersavas
1996-12-19  0:00                     ` Tom Bushell
1996-12-23  0:00                       ` David Bradley
1996-12-23  0:00                         ` Jeffrey C. Dege
1996-12-19  0:00                     ` David Bradley
1996-12-20  0:00                       ` Chris Brand
     [not found]                       ` <01bbee11$dcae8460$ca61e426@DCorbit.solutionsiq.com>
1996-12-23  0:00                         ` David Bradley
1996-12-19  0:00                     ` Jeffrey C. Dege
1996-12-20  0:00                       ` Tom Bushell
1996-12-19  0:00                   ` Tansel Ersavas
1996-12-27  0:00                     ` clovis
1996-12-17  0:00               ` Nick Leaton
1996-12-07  0:00     ` Nick Thurn
1996-12-14  0:00       ` Robert C. Martin
1996-12-15  0:00         ` Todd Hoff
1996-12-15  0:00           ` Joseph W. Seda
1996-12-16  0:00           ` David Bradley
1996-12-19  0:00           ` Robert I. Eachus
1996-12-15  0:00     ` Damon Feldman
1996-12-06  0:00   ` Steve Heller
1996-12-06  0:00   ` David Bradley
1996-12-13  0:00   ` drush
1996-12-18  0:00   ` Matt Austern
1996-12-19  0:00     ` Risto Lankinen
1996-12-20  0:00   ` Jon S Anthony
1996-12-20  0:00   ` Jon S Anthony
1996-12-20  0:00   ` Tansel Ersavas
1996-12-20  0:00   ` Tansel Ersavas
1996-12-26  0:00     ` What sells IT (was: What is wrong with OO ?) Cameron Laird
1996-12-20  0:00   ` What is wrong with OO ? Bill Gooch
1996-12-23  0:00   ` Jon S Anthony
1996-12-23  0:00   ` Jon S Anthony
1996-12-26  0:00   ` drush
1996-12-26  0:00   ` drush
1996-12-06  0:00 ` Myles Williams
1996-12-06  0:00 ` Ranjan Bagchi
1996-12-06  0:00   ` Myles Williams
1996-12-07  0:00 ` Kazimir Majorinc
1996-12-14  0:00   ` Chris
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox