Various performance improvements#83
Merged
r-devulap merged 24 commits intonumpy:mainfrom Oct 13, 2023
Merged
Conversation
Member
|
On a TGL: Improves simdsort perf on 16-bit data by up to 1.25x |
r-devulap
requested changes
Oct 5, 2023
| X86_SIMD_SORT_UNROLL_LOOP(8) | ||
| for (int ii = 0; ii < num_unroll; ++ii) { | ||
| curr_vec[ii] = vtype::loadu(arr + left + ii * vtype::numlanes); | ||
| _mm_prefetch(arr + left + ii * vtype::numlanes |
Member
There was a problem hiding this comment.
ugh, the formatting from clang_format is ugly here. Might need to tweak some parameters in the _clang-format file.
r-devulap
reviewed
Oct 5, 2023
r-devulap
reviewed
Oct 5, 2023
24701aa to
dfa65db
Compare
r-devulap
requested changes
Oct 11, 2023
Member
|
Perf changes summary: Qsort: On SKX, up-to 1.9x speed up for 32-bit and up-to 1.5x speed up for 64-bit data. |
added 2 commits
October 13, 2023 12:35
r-devulap
approved these changes
Oct 13, 2023
Member
r-devulap
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the awesome work @sterrettm2!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This merge request adds a bunch of performance enhancements. It changes:
The small sorting algorithm to be more efficient (b52e889)
Changes how the partitioning is done in a few small ways (16e35b0)
Changes how the array is shortened to be a multiple of the correct length (d617059)
Changes how pivots are selected for larger arrays (91928b6)
Increases the amount of prefetching done (d4ecb7e)
And some smaller changes, like some small changes to the parameters used.
Note that this was tested on a 7900x, so the 16-bit performance results should be ignored.