Quote:
Originally posted by rbayer
Third, assembly is not any faster than any other language. For example, x86 assembly can be much slower than the equivalent C code if you turn on optimizations in your compiler. It's all in how you use it.
|
That's a bit of a "urban legend." Hand-crafted assembly can be significantly faster than what is output by a compiler, even with all optimizations turned on. It's the simple fact that when writing in assembly you can tell the processor to only do what you really need it to do at a much lower level than that of a higher-level language.
That said, the most useful part of assembly these days is the fact that it will result in an executable of much smaller size. There's a significant amount of overhead involved with a higher-level language that can be avoided by writing in assembly. Now why does size matter with huge hard drives being cheap? Embedded systems.
Matt