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

Add native julia fmod #47501

Merged
merged 21 commits into from
Dec 6, 2022
Merged

Add native julia fmod #47501

merged 21 commits into from
Dec 6, 2022

Conversation

gbaraldi
Copy link
Member

@gbaraldi gbaraldi commented Nov 8, 2022

Should fix #46467

Based on LLVMs libc implementation. About 5x faster than openlibm and 10% slower than glibc.

Tested on all values of Float16 and a large amount of Float32 and 64.

The amount of tests might be a bit much, since it's the exact same codepath independent of type. But maybe I should add some explicit Float16 tests. That function there tests all possible combinations but it's a bit too long.

@gbaraldi gbaraldi added the performance Must go faster label Nov 8, 2022
test/numbers.jl Outdated Show resolved Hide resolved
base/float.jl Outdated Show resolved Hide resolved
base/float.jl Outdated Show resolved Hide resolved
base/float.jl Outdated Show resolved Hide resolved
base/float.jl Outdated Show resolved Hide resolved
base/float.jl Outdated Show resolved Hide resolved
base/float.jl Outdated Show resolved Hide resolved
base/float.jl Outdated Show resolved Hide resolved
base/float.jl Outdated Show resolved Hide resolved
base/float.jl Outdated Show resolved Hide resolved
base/float.jl Outdated Show resolved Hide resolved
base/float.jl Outdated Show resolved Hide resolved
gbaraldi and others added 2 commits November 10, 2022 16:26
Co-authored-by: Alex Arslan <ararslan@comcast.net>
Co-authored-by: Alex Arslan <ararslan@comcast.net>
@oscardssmith
Copy link
Member

I think this looks ready! I'll merge in a few days if no one objects.

base/float.jl Outdated Show resolved Hide resolved
Co-authored-by: Alex Arslan <ararslan@comcast.net>
Copy link
Member

@ararslan ararslan left a comment

Choose a reason for hiding this comment

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

Some extremely pedantic comments, some may be useful.

base/float.jl Outdated Show resolved Hide resolved
base/float.jl Outdated Show resolved Hide resolved
base/float.jl Outdated Show resolved Hide resolved
base/float.jl Outdated Show resolved Hide resolved
base/float.jl Outdated Show resolved Hide resolved
base/float.jl Outdated Show resolved Hide resolved
base/float.jl Outdated Show resolved Hide resolved
base/float.jl Outdated Show resolved Hide resolved
base/float.jl Outdated Show resolved Hide resolved
gbaraldi and others added 5 commits November 13, 2022 09:00
Co-authored-by: Alex Arslan <ararslan@comcast.net>
Co-authored-by: Alex Arslan <ararslan@comcast.net>
Co-authored-by: Alex Arslan <ararslan@comcast.net>
Co-authored-by: Alex Arslan <ararslan@comcast.net>
base/float.jl Outdated Show resolved Hide resolved
base/float.jl Outdated Show resolved Hide resolved
base/float.jl Outdated Show resolved Hide resolved
base/float.jl Outdated Show resolved Hide resolved
base/float.jl Outdated Show resolved Hide resolved
base/float.jl Outdated Show resolved Hide resolved
@gbaraldi
Copy link
Member Author

Do we want this in 1.9?

@KristofferC
Copy link
Sponsor Member

Imo yes, it fixes a perf regression

@oscardssmith
Copy link
Member

oscardssmith commented Nov 25, 2022

should we merge this now?

@gbaraldi
Copy link
Member Author

I believe so, if we find a way to fix the effects of the bitwise operations without breaking other things we can change here.

@ViralBShah
Copy link
Member

Merge?

@oscardssmith oscardssmith merged commit cf5ae03 into JuliaLang:master Dec 6, 2022
KristofferC pushed a commit that referenced this pull request Dec 8, 2022
* Add native julia rem

Co-authored-by: Alex Arslan <ararslan@comcast.net>
(cherry picked from commit cf5ae03)
@KristofferC KristofferC mentioned this pull request Dec 14, 2022
26 tasks
@KristofferC KristofferC removed the backport 1.9 Change should be backported to release-1.9 label Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Must go faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

performance regression for Core.Intrinsicts.rem_float in 1.8/1.9
7 participants