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: take into account that floating point special cases (NaN, Inf) are unlikely #25125

Open
mundaym opened this issue Apr 27, 2018 · 2 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. help wanted Performance
Milestone

Comments

@mundaym
Copy link
Member

mundaym commented Apr 27, 2018

math.IsNaN and math.IsInf are very unlikely to return true. It would be nice to use this information for code layout.

I have hacked together a prototype using SSA rules but there is probably a better way to do it. The prototype is here: https://go-review.googlesource.com/c/go/+/64191. Feel free to take that and improve it.

@josharian
Copy link
Contributor

Haven't looked at the CL, but naively it seems like the likelyadjust pass is the right place to do this.

@bcmills
Copy link
Member

bcmills commented Apr 27, 2018

I would certainly believe that math.IsNaN is usually false. I suspect that math.IsInf depends on the application.

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. help wanted Performance
Projects
None yet
Development

No branches or pull requests

4 participants