-
Notifications
You must be signed in to change notification settings - Fork 30
Lower the threshold to use sequential sort #1866
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
Conversation
The threshold lowered from 64 elements to sort, to 16 elements. This recovers monotonicity of run-times curve. When number of array elements along the axis we sort is less than the threshold, a quadratic complexity insertion sort is used. Too high a value of the threshold (64) made for the artifact, where sorting 63 elements took several times longer than sorting 65 elements. Setting it to 16 recovers monotonicity (sorting 16 elements is not slower than sorting 17 elements).
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞 |
Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_134 ran successfully. |
Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_133 ran successfully. |
Array API standard conformance tests for dpctl=0.19.0dev0=py310hdf72452_135 ran successfully. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
The threshold lowered from 64 elements to sort, to 16 elements. This recovers monotonicity of run-times curve.
When number of array elements along the axis we sort is less than the threshold, a quadratic complexity insertion sort is used. Too high a value of the threshold (64) made for the artifact, where sorting 63 elements took several times longer than sorting 65 elements.
Setting it to 16 recovers monotonicity (sorting 16 elements is not slower than sorting 17 elements).