Content deleted Content added
Two more typos: sollution -> solution; ofcourse -> of course |
m a i -> an i |
||
Line 46:
In some cases self-modifying code executes slower on modern processors. This is because a modern processor will usually try to keep blocks of code in its [[cache]] memory. Each time the program rewrites a part of itself, the rewritten part must be loaded into the cache again, which results in a slight delay.
The cache invalidation issue on modern processors, usualy means, that self modifing code would still be faster, only when the modification will occure seldomly. Such as in the case of a state switching in
This concideration is not unique to processors with code cache, since on any processor, rewriting the code never does come for free.
|