Newsgroups: | comp.compilers |
From: | henry@zoo.toronto.edu (Henry Spencer) |
Keywords: | C, performance, assembler |
Organization: | U of Toronto Zoology |
References: | 93-10-104 93-10-129 |
Date: | Sun, 31 Oct 1993 03:07:54 GMT |
winikoff@munta.cs.mu.OZ.AU (Michael David WINIKOFF) writes:
>>... Didn't Ritchie [say it]
>>accounted for a 10% loss when the Unix kernel was rewritten in C?
>Unix rewritten in C --- this was on a CISC processor.
Bear in mind, also, that this was with a relatively simple compiler. It
put a fair bit of effort into good local code generation, but made not the
slightest attempt at global optimization. Note that when I say "local", I
really mean "local" -- for example, the reason why C has a "register"
keyword for declarations is that the compiler made no attempt to do clever
register allocation.
Actually, I don't recall having seen Dennis quote a specific number like
"10%". It's hard to compare the assembler and C versions of Unix, because
the re-coding in C involved extensive internal redesign, not just
translation. The original Ritchie&Thompson paper quotes a code growth of
about one-third, but notes that the new system had many functional
improvements as well.
--
enry Spencer @ U of Toronto Zoology, henry@zoo.toronto.edu utzoo!henry
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.