it requires considerable knowledge, skill, and usually time, to get even a near-optimal solution in assembly language.
Yes it requires an effort, once, to get a library function working, but so what? Over years, we had a lot of fun picking a CRT function, e.g. strcmp, and giving it a thorough beating, see
here. And why is a factor five faster than CRT only "near-optimal"?
Now that may be an extreme example, but over time we have seen many CRT functions been replaced by assembler equivalents that did the job in less than half the time.
So much for speed and innermost loops. But what about a real life app? Does it really take longer to write
invoke CreateWindowEx instead of CreateWindowEx
();, with three extra chars that will ruin your fingers over the years?
Sure it will take more time if you mean "pure" assembler - Hutch maintains a nice demo at \Masm32\examples\exampl07\slickhuh
But only masochists use pure assembler, reasonable coders use macros mixed with pure assembler. For example, loading a text file from disk and shuffling it into a string array costs me one line.
One.
Handling arrays, whether "double" aka REAL8 or REAL4 or any integer size, can be easier with assembly macros than with most HLLs including C/C++
qWord has written a marvelous
simple math library that makes arithmetics as easy as in any other HLL.
We have rejecting and non-rejecting loops, C and Basic-style for loops.
We have a Switch/Case macro, and it has
a lot more power than its C equivalent.
We have several macros for SEH, e.g.
mine - but almost nobody uses them. Because we control our code so tightly that we would not allow a release version throwing exceptions.
Which brings me to my last point: Quality. HLL must be better, right? That's theory, practice is that
assembler forces the coder to reflect thoroughly on each and every line, and that produces better quality than code that relies on "my compiler knows how to do that".
Of course, C/C++ is everywhere, and most of the big commercial apps are written in that language. That is why I am not impressed, I see too much bullshit produced from apparently huge teams of programmers in
respected big software companies. MS Word forgetting to redraw, for example. And every time I shut my puter down instead of hibernating it, on reboot Adobe pops up and solemnly swears that this time the known security and performance problems are finally solved. IMHO they will be solved when Adobe goes back to BASIC.
[edit: fixed a garbled phrase]