Skip to content
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-93554: Conditional jumps only jump forward #96318

Merged
merged 11 commits into from
Sep 1, 2022

Conversation

iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented Aug 26, 2022

@iritkatriel iritkatriel added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Aug 26, 2022
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @iritkatriel for commit 8a3d017 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Aug 26, 2022
@iritkatriel iritkatriel marked this pull request as ready for review August 26, 2022 18:15
@iritkatriel iritkatriel self-assigned this Aug 26, 2022
Copy link
Member

@brandtbucher brandtbucher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this!

Just curious, have you benchmarked this change?

@brandtbucher
Copy link
Member

brandtbucher commented Aug 30, 2022

We might also consider adding a test that loops ending in branches can still quicken code.

For example, something like:

def f(x: bool) -> None:
    for i in range(1_000_000):
        if x:
            pass

Today f(True) quickens the code, but f(False) doesn't. After this change, both should.

Ditto for while loops. This code should be quickened after only one call:

def w() -> None:
    i = 0
    while i < 1_000_000:
        i += 1

@iritkatriel
Copy link
Member Author

Just curious, have you benchmarked this change?

I haven't yet.

@markshannon
Copy link
Member

markshannon commented Aug 31, 2022

Small speedup

@iritkatriel
Copy link
Member Author

We might also consider adding a test that loops ending in branches can still quicken code.

For example, something like:

def f(x: bool) -> None:
    for i in range(1_000_000):
        if x:
            pass

Today f(True) quickens the code, but f(False) doesn't. After this change, both should.

Ditto for while loops. This code should be quickened after only one call:

def w() -> None:
    i = 0
    while i < 1_000_000:
        i += 1

Where does such a test belong?

@iritkatriel iritkatriel added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Sep 1, 2022
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @iritkatriel for commit e87887c 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Sep 1, 2022
@iritkatriel
Copy link
Member Author

I'll merge this while the buildbots are happy with it, we can add more tests (for specialisation etc) in a followup PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants