|Re: Folk Theorem: Assemblers are superior to Compilers email@example.com (Mohd Hanafiah Abdullah) (1993-10-26)|
|compilers vs. assemblers firstname.lastname@example.org (1993-10-27)|
|From:||email@example.com (Tom Moog)|
|Keywords:||assembler, optimize, performance|
|Date:||Wed, 27 Oct 1993 15:23:19 GMT|
Compiler writers will always have limits to the number of optimizations
that they can implement. Each feature added to the language, each new
datatype, and each machine feature which is not symmetric/orthogonal adds
to the case analysis required by the compiler writer. At some point the
compiler writer runs out of time.
Since no language can include support for every feature (the idea is
absurd) it must follow that there will be cases when a skilled assembly
language programmer will produce better code due (a) a bad match between
the problem and the language features or (b) a deep understanding of the
problem by the assembly language programmer. This doesn't say how often
it will happen, only that sometimes it will be true.
For instance, if one needs to handle a bit vector composed of variable
length bit fields whose lengths are computed at run-time then this does
not map all that well to C. It would not be suprising if such a routine
could be improved on a machine which had built-in support for variable
length bit field instructions which span word boundaries (e.g. VAX).
Having said that, I also say it would be absurd to invest time in trying
to improve code generated by optimizing compilers for problems which are
easily expressed in the language.
Return to the
Search the comp.compilers archives again.