Hacker News new | ask | show | jobs
by jjice 2224 days ago
I'm actually working on a Pascal compiler right now. Register management has been a really tricky part for me, but I didn't even thing of treating an x86 processor as a stack based machine. Very clever, especially when you just want a simple compiler an not anything super optimized.
1 comments

A simple optimization is to make a stack machine with the top of stack cached in a register. This can improve speed about 10% in general operation.