-
Notifications
You must be signed in to change notification settings - Fork 2
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
Stop favouring numeric sort specialized algorithms #11
Comments
This repo is for evaluating different language's approaches to performing sorting dominated workflows. There are no requirements about the internals of the sorting algorithms, including whether they are comparison-based or non-comparison-based. That said, there are lots of sorting tasks and ways to evaluate sorting algorithms and I agree that it would be nice to cover cases other than IEEE floating point. If I get the time and energy to do it, I might extend this repo to a wider scope. However, having to reproduce all the benchmarking code in 8 languages makes this somewhat time-consuming. which is why, as of now, according to the readme, "the benchmark covers only sorting of random floating point numbers into increasing order." |
Yep. IMHO this necessitates a big disclaimer in the readme about the comparison ( |
Please quote complete sentences when a partial sentence excerpt omits important limitations.
|
Yes, that is exactly what I meant - "twice as fast" is by far not - and I quote - "a rough idea of performance" (in the context of sorting algorithms where the champions compete with rather small differences in performance). That is why I find it very misleading and actually rather false. |
It seems the current benchmark sorts numbers (disregarding whether floats or integers) in an array/vector/list/...
Yet, this is fundamentally flawed in my opinion as many (most?) languages and compilers and libraries do specialization (in compile time or in run time or both) and switch to magnitudes faster numeric sorting algorithm ("non-comparison sort") which has totally different mathematical boundaries (almost
O(n)
) than what this benchmark wants to measure - i.e. the pair-wise comparison sorting algorithms ("comparison sort") with provably best possibleO(n log n)
.https://en.wikipedia.org/wiki/Sorting_algorithm#Non-comparison_sorts
Should we rather compare some complex structs of e.g. 19 bytes in size?
I would prefer no power of 2, not bigger than half of a typical cache line (i.e. max 32 bytes), no even number, and not "power of two plus 1" (to make struct compression difficult to avoid matching power of 2). Any implicit padding under the hood is fair IMHO.
The text was updated successfully, but these errors were encountered: