Learning C>
Mistoffolees
...compressed...
Overlord
...compressed...
Scorpion
...compressed...
David P. Taylor, III
Compilers might be good and all that, but they are definitely not as fast as decent assembly. I've multiplied the speed of more than one program just by rewriting a single subroutine in assembly. That sort of thing actually justifies the extra effort involved in assembly.
Trimind
...compressed...
Malcolm Petcher
It depends entirely on the skill of the compiler writer. Some compilers will usually generate more efficient code than the average assembly programmer. Most won't. On a machine with a lot of registers like a VAX or R3000 the compiler has the advantage of being able to keep variables and intermediate results in registers without forgetting where they are. Most human assembly programmers will try this a time or two and flub it so badly that they resort to stashing everything in memory. A really good compiler/linker combination (such as exist in the Ada world) can globally optimize across procedure calls and separately compiled units. Any human assembly programmer who tries this deserves what he gets. It's all becoming academic anyway. Processors are getting so fast that except in unusual circumstances it is preferable to have the maintainability and portibility of high level language to any efficiency to be gained by assembly.
swandOg
...compressed...
nezmer
...compressed...
Overlord
...compressed...
David P. Taylor, III
Malcolm, I agree with using high-level for most of it, but when rewriting a procedure or two in assembly makes fantastic improvements, it's hard to resist.
Malcolm Petcher
True David, and I've done it myself when faced with a program that just can't meet timeline requirements in a real time system. However, when an assembly rewrite makes that big a difference I can't resist reviewing the high level version to see if I did something that caused so much inefficiency. As often as not I'll find I did, and without realizing, fixed the problem when writing the assembly version. A couple of classic examples are extra nested loops and things that defeat optimization. Writing in C, creating loops is a breeze so sometimes we nest them more deeply than they really needed to be. In assembly, loops are generally a pain in the neck, so we work extra hard to avoid them. Function calls in C are also easy, but they bring the optimizer to a screeching halt. Any registers containing variables have to be saved, etc. In assembly, calling a C function is a pain in the neck, so we either rewrite the function in assembly as well, in which case we know what registers will actually be changed. We likely also pass the parameters in registers. Or, if not to big, we just code the function in-line. The original C code could have benefitted from loop optimization and in-line functions, it just takes doing it in assembly to realize that. Granted, these things don't always work and one is occasionally forced to resort to assembly, but it's always worth taking a look.
Trimind
...compressed...
Monster Dog
net test received here, dog.
Scorpion
...compressed...
Monty Python
Net Test Received here, Dog
chester cheetah
...compressed...
Brent Bottles
stdaux under MS-DOS is COM1, unless something else has changed it along the
way.
Mike McCarty
...compressed...
swandOg
...compressed...
Captain James T Kirk
...compressed...
Brent Bottles
...compressed...
Saint Bob
...compressed...
monty python
...compressed...
swandOg
...compressed...
Malcolm Petcher
...compressed...
Malcolm Petcher
...compressed...
Jay Dee Pritchard
...compressed...
Brent Bottles
...compressed...
UNIcorn
...compressed...
Jay Dee Pritchard
...compressed...
Malcolm Petcher
...compressed...
Sidney Malak
...compressed...
swandOg
...compressed...
Brent Bottles
...compressed...
Ambition
...compressed...
Plus Plus Plus
...compressed...
Robert Kimmel
...compressed...
Monster Dog
...compressed...
Frunobulax
...compressed...
Ray
...compressed...
Don Glover
...compressed...
Jay Dee Pritchard
...compressed...
Robert Kimmel
...compressed...
Brent Bottles
...compressed...
Mike McCarty
...compressed...
Malcolm Petcher
...compressed...
Chang Yoon
...compressed...
Frunobulax
...compressed...
Trimind
...compressed...
Jay Dee Pritchard
...compressed...
Lazarus Long
...compressed...
Robert Kimmel
...compressed...
Ray
...compressed...
Don Glover
...compressed...
Brent Bottles
...compressed...
Joe Malik
...compressed...
Nider
...compressed...
Don Glover
...compressed...
Malcolm Petcher
...compressed...
Robert Kimmel
...compressed...
Nasal Slime Eruption
...compressed...
JayDee
...compressed...
Fo Ming At Mouth
...compressed...
Kaptain K Mart
...compressed...
Kaptain K Mart
GriFFin
Malcolm Petcher
...compressed...
Plus Plus Plus
...compressed...
Trimind
...compressed...
Frunobulax
...compressed...
Monster Dog
...compressed...
Malcolm Petcher
...compressed...
Trimind
...compressed...
David P. Taylor, III
...compressed...
Malcolm Petcher
...compressed...
William Wicker
...compressed...
Malcolm Petcher
...compressed...
Trimind
...compressed...
VIOLENTPINKPHENOMENON
...compressed...
Raxxillion
...compressed...
Malcolm Petcher
...compressed...
Monster Dog
...compressed...
Plus Plus Plus
...compressed...
David P. Taylor, III
...compressed...
Don Glover
...compressed...
Stephen Coy
...compressed...
Trimind
...compressed...
Malcolm Petcher
...compressed...
Stephen Coy
Who's facts? :-)
Fo Ming @ Mouth
...compressed...
Robert Kimmel
...compressed...
Trimind
...compressed...
Fake True Overlord
...compressed...
Trimind
...compressed...
Robert Kimmel
...compressed...
Trimind
...compressed...
Trimind
...compressed...
Malcolm Petcher
...compressed...
David P. Taylor, III
...compressed...
Fo Ming @ Mouth
no...
Eric Moon
...compressed...
Howlin' Hobbit
...compressed...
Mistoffolees
...compressed...
Robert Kimmel
...compressed...
Malcolm Petcher
...compressed...
Chang Yoon
...compressed...
Malcolm Petcher
...compressed...
Malcolm Petcher
...compressed...
Chang Yoon
...compressed...
chester cheetah
...compressed...
Flying Wombat
...compressed...
Don Glover
...compressed...
nezmer
Fo Ming: Huh?
JayDee
...compressed...
torso
...compressed...
Malcolm Petcher
...compressed...
Saint Bob
<smirk>
Frunobulax
...compressed...
Chang Yoon
...compressed...
Monster Dog
...compressed...
Malcolm Petcher
...compressed...
Frunobulax
...compressed...
Cave Bear
...compressed...
Robert Kimmel
...compressed...
Eric Moon
...compressed...
Ray
...compressed...
Mistoffolees
...compressed...
LaDzhaRi
...compressed...
Trimind
...compressed...
Robert Kimmel
...compressed...
chester cheetah
...compressed...
Frunobulax
...compressed...
Robert Kimmel
...compressed...
Joe Momma
...compressed...
Frunobulax
...compressed...
Robert Kimmel
...compressed...
Trimind
...compressed...
Robert Kimmel
...compressed...
Eric Moon
Eeew.
Frunobulax
...compressed...
Destroyer
...compressed...
Mistoffolees
...compressed...
Frunobulax
...compressed...
Robert Kimmel
...compressed...
VIOLENTPINKPHENOMENON
...compressed...
Trimind
...compressed...
Stephen Coy
...compressed...
Robert Kimmel
...compressed...
Trimind
...compressed...
Robert Kimmel
...compressed...
Robert Kimmel
...compressed...
Robert Kimmel
...compressed...
Trimind
...compressed...
Centauri
...compressed...
Stephen Coy
...compressed...
Robert Kimmel
...compressed...
Robert Kimmel
...compressed...
Dargos
...compressed...
Robert Kimmel
...compressed...
Trimind
...compressed...
Robert Kimmel
...compressed...
Scorpion
...compressed...
Trimind
...compressed...
Gandalf
...compressed...
Robert Kimmel
...compressed...
JayDee
...compressed...
Saint Bob
...compressed...
VIOLENTPINKPHENOMENON
...compressed...
Frunobulax
...compressed...
Frunobulax
...compressed...
Scorpion
...compressed...
VIOLENTPINKPHENOMENON
...compressed...
Captain James T Kirk
...compressed...
Scorpion
...compressed...
Robert Kimmel
...compressed...
Eric Moon
...compressed...
Trimind
...compressed...
Robert Kimmel
...compressed...
Scorpion
...compressed...
Learning C> _