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

cmd/compile: optimize x > a && x < b to uint(x - a) < b - a when a, b are constants and b > a #16697

Closed
minux opened this issue Aug 15, 2016 · 3 comments

Comments

@minux
Copy link
Member

minux commented Aug 15, 2016

https://golang.org/cl/27032 demonstrated that by doing this
transformation, ~10% improvement can be seen in benchmarks
from the unicode package

@josharian
Copy link
Contributor

I have a CL for this ready. Just haven't mailed it yet.

@josharian josharian self-assigned this Aug 15, 2016
@hirochachacha
Copy link
Contributor

That sounds good!

@minux minux changed the title cmd/compiler: optimize x > a && x < b to uint(x - a) < b - a when a, b are constants and b > a cmd/compile: optimize x > a && x < b to uint(x - a) < b - a when a, b are constants and b > a Aug 15, 2016
@gopherbot
Copy link

CL https://golang.org/cl/27652 mentions this issue.

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

No branches or pull requests

4 participants