37 ms·
When learning MIPS, the lessons I followed recommended something similar to this. We didn't look at the compiled assembly but used C as a form of pseudocode for
by jwdunne 10y ago
When learning MIPS, the lessons I followed recommended something similar to this. We didn't look at the compiled assembly but used C as a form of pseudocode for assembly. It was a valuable experience - especially the illumination on how close to the machine C is whilst looking much higher level to me before that.
I tested to see if writing the code first in Scheme or CL offered the same benefits. It did not - it was far easier to translate solutions from C to assembly. My only guess is that a lot of work in C is similar to what I had to do in assembly, where in Scheme there isn't such things. So C only took away handling the stack for procedures and what not, where as scheme took away that and the rest of what I would need to do in assembly. Long story short, the solution in C was closer to assembly than the solution in scheme.