5 ms·
Machines and CPU time are cheap...at least compared to the price of hiring additional programmers to maintain the mess of assembly code you just wrote.
by gavanwoolery 15y ago
Machines and CPU time are cheap...at least compared to the price of hiring additional programmers to maintain the mess of assembly code you just wrote.
- timthorn 15y agoAssembly code doesn't need to be a mess. Usual rules apply - you can write a mess in any language, much as you can write well structured code in any language.
- hapless 15y agoObsessive micro-optimization obscuring the function of code is always a mess. You are correct that the mess is language agnostic. For example, if he'd attempted to discard the low order bit of his prime numbers in C, it would result in the same awful maintenance. Some optimizations waste too much programmer time to be worth tackling. Distorting the meaning of code for some tiny performance gains never constitutes "well-structured" code.
- timthorn 15y agoOptimisation is not the same as programming. You can program in Assembly without trying to make your code as performant as possible. Just because you use Assembly as your medium of describing your intent, doesn't mean that you're obsessive about micro-optimisation.