-
Notifications
You must be signed in to change notification settings - Fork 20.5k
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
core/vm: Move interprepreter intrerruption check to jump instructions #24026
Conversation
On my machine all 3 variants (no check, check every jump, check every 64th jump) look to have the same performance. No check vs check every jump:
Check every jump vs every 64th jump:
|
I think we need some unit tests for this use case first: execute long running loop in one go-routine and abort it in second go-routine. |
If it's indeed 'natively' atomic on |
It is just However, the version with counter looks faster on average, but not in a benchmark purely focusing on jumps like "jump_around". Interestingly, in the
|
In both cases it seems the compiler predicts branch correctly:
but if you look closely you will see it only considers the second condition of |
ed48174
to
390e098
Compare
Unit test added. |
956cce9
to
2a7e913
Compare
I removed the commit with checking every 64th jump and made the unit test end by timeout if |
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.
LGTM
…hereum#24026) * core/vm: Remove interpreter loop interruption check * core/vm: Unit test for interpreter loop interruption * core/vm: Check for interpreter loop abort on every jump
…hereum#24026) * core/vm: Remove interpreter loop interruption check * core/vm: Unit test for interpreter loop interruption * core/vm: Check for interpreter loop abort on every jump
Fixes #23969