2 ms·
...which is exactly what the callee within the loop would have to do if it used those registers. But I guess your point is that in the callee-save case it only
by dreamcompiler 4y ago
...which is exactly what the callee within the loop would have to do if it used those registers. But I guess your point is that in the callee-save case it only happens when it needs to happen, while in the caller-save case it happens every time whether it needs to or not.
- dzaima 4y agoyep, hence why calling conventions usually have both callee-saved and caller-saved registers, so that you only have "unnecessary" stack usage when you need to use more than roughly half of the registers.