-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
GH-113710: Improve _SET_IP and _CHECK_VALIDITY
#115248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-113710: Improve _SET_IP and _CHECK_VALIDITY
#115248
Conversation
gvanrossum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG!
|
Stats and performance show a ~2% speedup (which seems high, so is probably mostly noise) but some meaningful improvement in the stats:
|
Yes, and the HPT result confirms your hunch that it's mostly noise: 1.00x faster at 99th %ile |
_SET_IPto take the pointer as its operand, saving a couple of machine instructions_CHECK_VALIDITY_AND_SET_IP"super micro op"_SET_IPand_CHECK_VALIDITY.The
_CHECK_VALIDITY_AND_SET_IP"super micro op" isn't that useful at runtime as_SET_IPis needed before an escaping instruction, and_CHECK_VALIDITYis needed after an escaping instruction, so they tend to be independent.However, it means that half of the uop buffer is useful instructions rather than a third.