i was curious . if i make a self modeifing code on the stack will it be slower ?
There is no difference is speed as to where the self modifying code is, because its all the same - memory. Although, self modifying code can be an elegant trick sometimes but it is also quite slow - on modern CPUs, it means the CPU will have to invalidate code cache and that does kill quite a few CPU clocks.
There is a good chance the stack isn't in the code cache. :grin: