Add file describing how to add or modify specialized families of instructions. by markshannon · Pull Request #26954 · python/cpython
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It depends, so yes use your judgement.
If a specialization covers a lot of cases and reduces the number of misses by a lot, then a x2 speedup would be fine. For a more narrow specialization, something more like x4 would be appropriate.
I'm talking about the time spent in the instruction only, so for call instructions don't count the time spent in the callee or the overhead of making a C call.