Skip to content

math: add ARM64 implementation of frexp #47589

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

howjmay
Copy link
Contributor

@howjmay howjmay commented Aug 7, 2021

The implementation of Frexp on ARM64 has been implemented in this PR.

The following benchmark was run on Apple Silicon M1 chips.
BenchmarkArchFrexp-8 1.581 ns/op 0 B/op 0 allocs/op
BenchmarkFrexpGO-8 2.079 ns/op 0 B/op 0 allocs/op

The time spent on each iteration drop 23.95%.

@google-cla google-cla bot added the cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change. label Aug 7, 2021
@gopherbot
Copy link
Contributor

This PR (HEAD: 9e4a3d8) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/340629 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: bf0f19f) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/340629 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

SUB $(52), R1, R1 // set R1 to -52
FMOVD F0, R0
// tmp = int((x>>shift)&mask)
UBFX $52, R0, $11, R0
Copy link

@lovung lovung Aug 7, 2021

Choose a reason for hiding this comment

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

I am not familiar with it but is it a wrong indent?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for pointing out. This style twist was causing by space. I have replaced it by tab. Thank you.

@gopherbot
Copy link
Contributor

This PR (HEAD: 9d8f0be) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/340629 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: 2b942c1) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/340629 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: 24f4cf6) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/340629 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: 544bfa2) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/340629 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@howjmay howjmay changed the title math: Add ARM64 implementation of frexp math: add ARM64 implementation of frexp Aug 8, 2021
The implementation of Frexp on  ARM64 has been implemented in this PR.

The following benchmark was run on Apple Silicon M1 chips.
BenchmarkArchFrexp-8    1.581 ns/op  0 B/op  0 allocs/op
BenchmarkFrexpGO-8   	2.079 ns/op  0 B/op  0 allocs/op

The time spent on each iteration drop 23.95%.
@gopherbot
Copy link
Contributor

This PR (HEAD: 92fe95f) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/340629 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants