Rudolf, On Thursday 10 November 2005 15:08, rudolf wrote:
On Tue, 2005-11-08 at 22:08 -0800, Randall R Schulz wrote: ...
A myth usually shown false with a little assembler.
That's irrelevant, because code written in assembly has little or no portability to other platforms and often marginal portability to other processors in the same family. And programmer productivity writing in assembler is abysmal.
. . . Portability and programmer productivity has nothing to do with program execution speed. The difference in C and C++ runtimes will be dependent on the compiler used.
Not directly, at least, nor did I claim it did. What I am saying is that some hypothetical advantage for assembler in some restrictive setting under some restrictive assumptions will almost never make up for the sizeable down-side of programming at the lowest (or nearly lowest) level possible. To address your point, productivity actually can become a factor in program speed because programming / programmer time is a limited resource like any other, and the amount of work required to produce correct and optimized code must be taken into account. Working in higher-level languages, while it may (_may_) exact some run-time costs, will pay back in other ways. Ultimately, a given programming project may well (often will) reach a given level of performance from the software earlier when doing more of the programming in a higher-level language than in assembly. The portability issues with assembler introduce a parallel set of impacts on performance, since work done to optimize for one architecture or CPU model is either not at all or only partially applicable on other processors. There are good reasons assembly programming is justified less and employed less and less each year. Basically, if software is going to meet the challenges ahead, it's going to have to look to higher-level means of expressing programmatic intent, not lower-level ones.
Rudolf
Randall Schulz