|
Still waiting for swap prefetch
Still waiting for swap prefetch
Posted Jul 26, 2007 0:09 UTC (Thu) by briangmaddox (guest, #39279)
In reply to: Still waiting for swap prefetch by kune
Parent article: Still waiting for swap prefetch
"Of course you will always be able to write faster code in C, but this will take you some more time."
Ya had me until you said this. Why stop at C, when it could be written in ASM? And heck, how do you know the assembler will generate fast code, better do it in hex instead.
I would have thought that after all these years that people would learn more about computer science and programming than to troll the "C is always faster than everything else" line.
(Log in to post comments)
"Ya had me until you said this. Why stop at C, when it could be written in ASM? And heck, how do you know the assembler will generate fast code, better do it in hex instead."
Hex? No thanks, i prefer to hack the macro assembler and control the logic gates on my cpu directly.
The thing to do is to generate the assembler and then munge it with a horrible perl script.
(Hey, ghc does it, it must be good! :) )
Why stop at C, when it could be written in ASM?
That's not a natural progression. Code compiled from C is often faster than that compiled from assembly language, for the same reason that a computer can land an airplane more smoothly than a human. Even code compiled from C by a naive compiler (e.g. gcc -O0) is unlikely to be slower than code compiled from assembly language. C is that low-level a language.
how do you know the assembler will generate fast code, better do it in hex instead
Wedo know that. The assembler will generate code that is not only the same speed as that generated by the hex editor, but is actually the same code. That's the definition of assembly language.
I would have thought that after all these years that people would learn more about computer science and programming than to troll the "C is always faster than everything else" line.
The only line I saw was, "C is always faster than Python." And it is, isn't it?
|