-
Notifications
You must be signed in to change notification settings - Fork 501
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
Suggestion for stack size when calling par_sort_unstable #1146
Comments
I don't there can be a standard suggestion, because it depends on both the number of elements and the number of threads in the pool, at least. In theory it will have logarithmic depth, but work-stealing will lengthen that further. I wonder if we need to be smarter about Lines 754 to 756 in 990841b
i.e. rather than just a fixed constant, maybe that should also consider Similarly, the stable sort has two constants, Lines 621 to 623 in 990841b
Lines 440 to 444 in 990841b
|
Well, what if I know the number of elements, their size, and the number of threads in the pool? Just ballpark. |
I don't know. You'll get a better answer if you run a few experiments yourself. |
I'm running into the same issue and have found that around 5-10B elements the default of 2MB seems to break, so I'm testing out a heuristic of using max[1, log2(N / 5e9)] * 2 MB right now. |
Update: I actually ran into a |
Is there any standard suggestion for the stack size when calling
par_sort_unstable
? We're sorting dozens of billions of elements and we would like to provide the user with some sound default.The text was updated successfully, but these errors were encountered: