Comment on Making Old Computers Count To A Million by J. Peterson
I remember getting a new RISC box at work, and wrote a loop to count to a million just to get a rough idea of the CPU speed. It finished -suspiciously- fast (a microsecond or two).
I disassembled the code and discovered the compiler thought the loop was dumb and removed it in favor of just returning 1,000,000.
评论
?
参与讨论