TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Hank Barta
from: Peter Hansen
date: 1994-09-16 19:00:00
subject: Real-time

In a message on 09-16-94, Hank Barta said to Peter Hansen:

HB>I think that that you need to be a bit cautious about dismissing
HB>higher level languages out of hand for real time or other 'bounded'
HB>systems. 

Thanks for the comments, Hank.  I never have and never will dismiss high
level languages "out of hand".  High level languages give such a boost
in productivity, reliability, reuseability, etc. ad nauseum that I would
never dream of implementing most of my applications in anything but.  

You will note I said I hadn't used C++ *directly* in a time critical
system and that is for a very good reason.  When it comes down to the
core loop of my algorithm and certainly the fundamental routines in my
real-time kernel it would simply be impossible to achieve reasonable
performance without using assembler.  Hand-tuned assembler continues to
produce the tightest and fastest code for _older_ micros (I have no
opinion about RISC CPUs in this respect) and in many cases, such as
context switching within the kernel, it would simply be impossible to
use a high level language, period.

HB> A good optimizer can apply scores of code size of speed reduction
HB> techniques to the code that would be way too tedious and error prone
HB> for any 'human' programmer (IMHO) and thus has distinct advantages
HB> over an assembler.

And yet compiler technology (yes, even WATCOM's :-) still hasn't reached
the point where I can't look at any non-trivial subroutine and remove 
many cycles and bytes by carefully stuffing registers full of various
values and using tricks of various kinds.  This sounds hideous and I
agree it produces ugly code but sometimes it's simply a necessity to
achieve this kind of performance.  When it's not necessary, I
wholeheartedly agree with your view.  Believe me, when high level
language compilers get that good I will dump Assembly faster than Bob
Rae will be bounced from his premier's office in our next election.  

At that point, the core of my kernel may remain the only place where
Assembly is both necessary and, in fact, the only solution.  When I have
the ability to adjust stack pointers from C (i.e. never :) I will be
able to surmount that problem, too...

Peter Hansen  ***  Engenuity Corporation  ***  Guelph, Ontario, Canada
Internet: peter.hansen{at}canrem.com    RelayNet:->CRS    FIDO:(1:229/15)
___
 * MR/2 * ***  Learn Esperanto, the international language.  ***

--- QScan v1.12b / 01-0348

* Origin: FidoNet: CRS Online, Toronto, Ontario (1:229/15)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413
SEEN-BY: 711/430 807 808 809 934 942 712/353 623 713/888 800/1
@PATH: 229/15 3615/50 229/2 12/2442 711/409 54/54 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.