4 ms·
How will you code it if "goto" took zero cpu-cycle ? Clue - You will need to use both "left" and "right" movement.
by vk0 11y ago
How will you code it if "goto" took zero cpu-cycle ?
Clue - You will need to use both "left" and "right" movement.
- drewm1980 11y agoYeah, I'm assuming the interviewers either tell you how many cycles each instruction takes, or expect you to ask them. I had to tinker a bit to figure out which instructions cost a cycle and which didn't. Would certainly be much harder under pressure and without a cycle accurate simulator.