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

Optimization: Be less conservative in implementation of unread_after(). #403

Merged
merged 1 commit into from
May 4, 2015

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Aug 19, 2014

It was really implemented as if it were "unread AT OR after". It's used to determine whether it's safe to elide assignments to variables that aren't subsequently use. But sometimes the assignment is a function where the variable assigned to is also one of the arguments. For example,

x = func(x,y)

x is read on that op, but not AFTER. But because of how the unread_after also discounted elision if used on that op, it was less aggressive than it could have been in eliminating statements like this.

I'm seeing around a 1/2 - 1% speedup on production frames because of this, with a similar decrease in post-optimized symbols and instructions. Not dramatic, but every little bit counts.

@fpsunflower
Copy link
Contributor

LGTM

@fpsunflower
Copy link
Contributor

It looks like this review was forgotten about (github still thinks it can merge it). Is that really the case?

@fpsunflower
Copy link
Contributor

It looks like it just never got committed -- the code still has the original <, not <=. Larry, do you remember if there ended up being an issue with this?

@lgritz
Copy link
Collaborator Author

lgritz commented Apr 23, 2015

I'm still sitting on this one, need to return to it.

What happened is that I in my pre-commit tests, I saw an image difference that needs to be investigated. The change should not have been able to make any visual changes.

@lgritz
Copy link
Collaborator Author

lgritz commented Apr 23, 2015

Sheesh, has it been that long? In my mind, I had put this off for a couple weeks. Oops. I'll get back to this.

@lgritz lgritz force-pushed the lg-unread branch 2 times, most recently from c3f2278 to bda2fff Compare May 4, 2015 17:53
It was really implemented as if it were "unread AT OR after". It's used
to determine whether it's safe to elide assignments to variables that
aren't subsequently use. But sometimes the assignment is a function
where the variable assigned to is also one of the arguments. For
example,
    x = func(x,y)
x is read on that op, but not AFTER. But because of how the unread_after
also discounted elision if used on that op, it was less aggressive than it
could have been in eliminating statements like this.
@lgritz lgritz merged commit 16b0ed8 into AcademySoftwareFoundation:master May 4, 2015
@lgritz lgritz deleted the lg-unread branch May 4, 2015 23:31
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.

2 participants