Curricula (was: Assembly vs. Everything Else

From: Jerome Fine <jhfine_at_idirect.com>
Date: Tue Sep 4 21:17:31 2001

>Mike Ford wrote:

> >Jumping in late, I know, but when I was at Georgia Tech (mid- to late-80s),
> >we were taught x86 assembly. There was a real focus on the concept that
> One of the most educational classes I took was writing assembly language
> modules that were called from Fortran on a IBM 360. Did a wonderfull job of
> beating a number of important concepts into my head, because either you
> understood or it didn't work.

Jerome Fine replies:

One of the most important lessons that can be learned is when a subroutine
written in FORTRAN (or any other high level language - even C) is converted
to assembly language is the efficiency of the code generator in the high level
language. In the past, assembly language was often twice as efficient.

However, these days, a complicated subroutine might be much more
efficient due to the ability of the CPU to begin execution of more than one
instruction at a time (or at least to begin several before others have finished).
Consequently, although converting a simple subroutine written in FORTRAN
to assembly language will almost always be more efficient, it can no longer
be stated with a complex subroutine.

On the other hand, I do agree with Mike that performing that conversion
teaches most people what the CPU actually does, instruction by instruction,
when a particular calculation needs to be accomplished. Indeed, there are
some operations that are well suited to be done in FORTRAN and others
which are not. It helps to learn to code in assembly language to understand
what the CPU is actually doing. Also, it is instructive to realize that when
a program needs to be executed only once or a very few times, a high level
language has its place since even if it is less efficient, the overall cost is much
less. But for large scale production, the reverse is usually true.

Been there, done that!

Sincerely yours,

Jerome Fine
Received on Tue Sep 04 2001 - 21:17:31 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:34:24 BST