Fallacy: More powerful instructions mean higher performance.
- Fewer instructions required
- But complex instructions are hard to implement
May slow down all instructions, including simple ones - Compilers are good at making fast code from simple instructions
Fallacy: Write in assembly language to obtain the highest performance.
- But modern compilers are better at dealing with modern processors
- More lines of code ⇒ more errors and less productivity
Fallacy: The importance of commercial binary compatibility means successful instruction sets don’t change.
지난 40년 동안 평균적으로 한 달에 하나 이상의 명령어가 추가되었다.
Pitfall: Using a pointer to an automatic variable outside its defining procedure.
- Sequential words are not at sequential addresses
• Increment by 4, not by 1! - Keeping a pointer to an automatic variable after procedure returns
• e.g., passing pointer back via an argument
• Pointer becomes invalid when stack popped