[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Assembler Language



>>>>> "Al" == Al Hudson <eah106 [at] york.ac.uk> writes:

    Al> I think probably I sounded a little harsh, 'cos I'm about to
    Al> agree with pretty much everything you said!! It was the idea
    Al> of writing a full program in asm that I was talking about
    Al> really, inline assembler is deinitely something I approve of.

Yeah, hear, hear!

My tuppence: If you're after speed and efficiency, of course you need
to learn assembler.  But remember that most of the Linux kernel is in
C, and it beats most commercial kernels hands-down for speed.  And it
doesn't use all that much assembler for optimization; rather it uses
it mostly for hardware access.  More important is to learn to use
static analysis tools, profiling tools etc to find out what's worth
optimizing.

Also, remember that most programs you run into at the user level (Owen
gives some good examples of exceptions) are I/O bound.

In particular, _games_ are I/O bound (except for say chess and go).
There, the real skill is in _graphic library selection_; odds are you
can't write inline code that will be faster than what the pros have
written (even the stuff that they donate to Linux distros, rather than
keep for their proprietary game machines ;-).  But some libriaries do
some things better than others.

May I recommend src/redisplay.c and friends from the XEmacs
distribution if you want to see just what kinds of insanity trying to
optimize display speed can lead to.  ;-)  No assembler there, just
dozens of different caching strategies to avoid repaints as much as
possible.

-- 
University of Tsukuba                Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences       Tel/fax: +81 (298) 53-5091
_________________  _________________  _________________  _________________
What are those straight lines for?  "XEmacs rules."
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word 
 "unsubscribe" in the body of the message. 

  GNU the choice of a complete generation.