Assembly vs Compilers
The cluster debates the merits of hand-written assembly code versus high-level languages and compilers, discussing performance, maintainability, optimizer effectiveness, and when assembly is necessary.
Activity Over Time
Top Contributors
Keywords
Sample Comments
Will compiled languages ever truly disrupt writing assembly code?
Don't write programs in assembly. Use a high level language that translates down to assembly.Yknow, most every language ever.If you had read the article, you'd see that the author made this comparison.
It's hard to imagine it's an improvement over just the raw assembly.
Writing assembly is tedious. It takes time and a lot of care. Sometimes it is necessary, e.g. writing certain parts of an OS.Almost always it involves carefully reading documentation, triple checking everything, mentally imagining the state of the processor, especially concerning whether interrupts can occur or what they would cause.Having done it a couple of times I, for the first time, really appreciated the abstraction of e.g. C. It made writing code and reasoning about it a lot easier.
These days the optimizer is so good few humans can do better over a large program. Even if they can, Intel will release a new cpu, or someone will buy amd and all your asm code is lost while those who write a compiled language just change a flag and get completely different binary.
If you write assembler in a maintainable way, do you still gain lots of benefits over a compiler?
Sounds like an assembly programmer trying C for the first time. Sure the produced assembly isn't as good as hand written. But with Moore's law, maybe it doesn't matter?
"If you're going to write assembly just write assembly."
Title should be "Why C development is faster if I don't indepth know how to write assembly fast."
You still write performance-critical code using assembly language. C compiler is not ideal.