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

Fix C++20 compatibility issues and faster integer hashing #55

Merged
merged 13 commits into from
Apr 24, 2023

Conversation

DanielLiamAnderson
Copy link
Contributor

@DanielLiamAnderson DanielLiamAnderson commented Apr 23, 2023

#53 identifies some issues with the atomic_wait/atomic_notify interface. The signatures of the wait and notify methods from the sample implementation do not match those in the C++20 standard, and the fallback when the standard library already implements them uses aliases which do not permit type deduction. This fixes both of those issues.

Some other compile issues with C++20 enabled have also been fixed, including some cases of aggregate initialization in TestParallel which are no longer valid, and the packed struct extension used in sequence_base, which wasn't applied widely enough.

This patch also addresses #40 by changing the hashing function Parlay uses for integer types. This corrects the performance regression in the grouping and deduping algorithms observed post-PR #22.

@codecov-commenter
Copy link

codecov-commenter commented Apr 23, 2023

Codecov Report

Merging #55 (c38e4f4) into master (5af0694) will increase coverage by 0.11%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master      #55      +/-   ##
==========================================
+ Coverage   96.58%   96.69%   +0.11%     
==========================================
  Files          51       51              
  Lines        3454     3452       -2     
==========================================
+ Hits         3336     3338       +2     
+ Misses        118      114       -4     
Impacted Files Coverage Δ
include/parlay/internal/sequence_base.h 98.56% <ø> (ø)
include/parlay/internal/atomic_wait.h 100.00% <100.00%> (ø)
include/parlay/utilities.h 99.23% <100.00%> (ø)

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@DanielLiamAnderson DanielLiamAnderson changed the title Fix C++20 compatibility issues Fix C++20 compatibility issues and faster integer hashing Apr 23, 2023
@DanielLiamAnderson
Copy link
Contributor Author

Performance test results attached. The performance of grouping and deduplicating algorithms is improved by up to 23%.

pr55-april23.zip

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

Successfully merging this pull request may close these issues.

2 participants