-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: high inline cost of encoding/binary and math.Float32bits #42788
Comments
As far as the Float32bits part goes, it could be similar to #42739. |
The big difference in BTW, |
Thanks, I'm aware. The code is a simplification of #28941 (comment) to ensure BCE works. |
I was thinking about the conversion overhead in math.Float32bits. Maybe I currently added a new case in
I'm not entirely sure, whether the
It didn't make it equivalent to just returning, however it seems like a worthwhile improvement nevertheless. |
I guess the whole This is more hacky case than the previous:
|
Perhaps all |
Yeah, that is simpler. I wasn't sure whether string to byte (or any other similar) conversions are represented by |
Change https://golang.org/cl/281232 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, also happens on tip.
What did you do?
The inline cost calculation for these seem inconsistent https://go.godbolt.org/z/YMKWjc
The inline cost for those:
There seems to be a really large difference between EncodeQuad2, EncodedQuad3 and EncodeQuad. I would expect all of them to be inlinable and similar in cost.
The text was updated successfully, but these errors were encountered: