-
Notifications
You must be signed in to change notification settings - Fork 6
Rethink how we identify loops. #101
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
Conversation
This commit, small though it is, makes two changes to how we inform
yk about Lua loops:
1. We now calculate where loops start when creating bytecode (rather
than continually examining every opcode in the main loop).
2. We now identify the beginning of the first instruction in a loop as
the start of a loop. Previously we identified the beginning of the
last instruction in a loop as the start of the loop.
The last change can make ~10% difference on some of the benchmarks I
tried, because the trace we get back is both less likely to deopt at the
"wrong points" and is more amenable to trace optimisation.
|
LGTM. Will wait for the dependency PR to merge. |
|
@vext01 I think we can try this now. |
|
We might need to wait for the patching patch to be patched in before this patch will merge. |
|
Oops, I forgot there's a second version. Forced pushed identical changes to the first. Should hopefully be ready to merge. |
|
Are you sure you force pushed? I don't see it. |
|
Oops, wrong PR! |
|
We need the |
[Needs https://github.com/ykjit/yk/pull/1606 merged first.]
This commit, small though it is, makes two changes to how we inform yk about Lua loops:
We now calculate where loops start when creating bytecode (rather than continually examining every opcode in the main loop).
We now identify the beginning of the first instruction in a loop as the start of a loop. Previously we identified the beginning of the last instruction in a loop as the start of the loop.
The last change can make ~10% difference on some of the benchmarks I tried, because the trace we get back is both less likely to deopt at the "wrong points" and is more amenable to trace optimisation.