FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-37271: Optimize bytecode multiple times until it cannot be optimized further by pablogsal · Pull Request #14068 · python/cpython · GitHub

/ cpython Public

bpo-37271: Optimize bytecode multiple times until it cannot be optimized further - #14068

Closed
pablogsal wants to merge 6 commits into
python:masterfrom
pablogsal:multiple_bytecode_opt
Closed

bpo-37271: Optimize bytecode multiple times until it cannot be optimized further#14068
pablogsal wants to merge 6 commits into
python:masterfrom
pablogsal:multiple_bytecode_opt

Conversation

pablogsal commented Jun 14, 2019
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

nedbat commented Jun 14, 2019

Copy link
Copy Markdown
Member

@pablogsal Any chance you want to help get #13600 finished?

Copy link
Copy Markdown
Member Author

@nedbat Sure, I will talk with Victor to see if we can push it forward.

pablogsal changed the title Optimize bytecode multiple times until it cannot be optimized further bpo-37271: Optimize bytecode multiple times until it cannot be optimized further Jun 14, 2019
pablogsal marked this pull request as ready for review June 14, 2019 02:00
pablogsal force-pushed the multiple_bytecode_opt branch 2 times, most recently from 576034a to f9b5588 Compare June 14, 2019 02:04
pablogsal self-assigned this Jun 14, 2019
pablogsal force-pushed the multiple_bytecode_opt branch 2 times, most recently from 64fa0b9 to 8188a1a Compare June 14, 2019 03:15

Copy link
Copy Markdown
Member Author

@serhiy-storchaka What do you think about this approach?

brettcannon added the performance Performance or resource usage label Jun 21, 2019
pablogsal force-pushed the multiple_bytecode_opt branch from 8188a1a to 282da9e Compare July 13, 2019 15:06
Comment thread Python/peephole.c Outdated
Comment thread Python/peephole.c Outdated
Comment thread Python/peephole.c Outdated
Comment thread Python/peephole.c Outdated
Comment thread Python/peephole.c Outdated
pablogsal force-pushed the multiple_bytecode_opt branch from 9119526 to 68a2657 Compare July 29, 2019 11:15

Copy link
Copy Markdown
Member Author

I have rebased and address the feedback. Also, I have added a max cap of iterations (although is not needed, it can be proven that the while loop will always finish) to make sure the time expended in the loop is always bounded.

pablogsal force-pushed the multiple_bytecode_opt branch 2 times, most recently from d9f5d4a to 99bb01a Compare July 29, 2019 11:17
pablogsal requested a review from tim-one July 29, 2019 11:17
pablogsal force-pushed the multiple_bytecode_opt branch 2 times, most recently from 7aed1c2 to a5ec1be Compare July 29, 2019 14:19

markshannon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks good in general, just a couple of questions.

Comment thread Python/peephole.c Outdated
Comment thread Python/peephole.c
pablogsal force-pushed the multiple_bytecode_opt branch from cc7a51f to cba4927 Compare September 9, 2019 14:49

Copy link
Copy Markdown
Member Author

@markshannon I have added some comments as requested, check if they look good to you :)

pablogsal force-pushed the multiple_bytecode_opt branch from 4c853b8 to 22560ac Compare September 9, 2019 15:42

Copy link
Copy Markdown
Member Author

CC: @Yhg1s

Copy link
Copy Markdown
Member Author

This is the code that is failing the assert currently:

def f(cond1, cond2):
    while 1:
        return 3
    while 1:
        return 5
    return 6

Yhg1s commented Sep 11, 2019

Copy link
Copy Markdown
Member

GH-15970 should fix the lnotab issue.

pablogsal closed this Nov 16, 2020
pablogsal deleted the multiple_bytecode_opt branch May 19, 2021 18:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review performance Performance or resource usage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants


Back | FazBrowse Home | New Git URL