-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Add radix sort #44230
Add radix sort #44230
Commits on Feb 17, 2022
-
Configuration menu - View commit details
-
Copy full SHA for ee3964b - Browse repository at this point
Copy the full SHA ee3964bView commit details
Commits on Feb 18, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 569a5c1 - Browse repository at this point
Copy the full SHA 569a5c1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 67b744c - Browse repository at this point
Copy the full SHA 67b744cView commit details -
Configuration menu - View commit details
-
Copy full SHA for b8ad40f - Browse repository at this point
Copy the full SHA b8ad40fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5fd8e42 - Browse repository at this point
Copy the full SHA 5fd8e42View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7cf473d - Browse repository at this point
Copy the full SHA 7cf473dView commit details -
Configuration menu - View commit details
-
Copy full SHA for d8363a5 - Browse repository at this point
Copy the full SHA d8363a5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 44b8411 - Browse repository at this point
Copy the full SHA 44b8411View commit details -
Configuration menu - View commit details
-
Copy full SHA for a22b120 - Browse repository at this point
Copy the full SHA a22b120View commit details
Commits on Feb 19, 2022
-
Configuration menu - View commit details
-
Copy full SHA for f0d6536 - Browse repository at this point
Copy the full SHA f0d6536View commit details -
Configuration menu - View commit details
-
Copy full SHA for c42ec18 - Browse repository at this point
Copy the full SHA c42ec18View commit details -
Configuration menu - View commit details
-
Copy full SHA for fc0e7bb - Browse repository at this point
Copy the full SHA fc0e7bbView commit details
Commits on Feb 20, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 7b665ef - Browse repository at this point
Copy the full SHA 7b665efView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c2e202 - Browse repository at this point
Copy the full SHA 0c2e202View commit details -
Configuration menu - View commit details
-
Copy full SHA for 44e4ea0 - Browse repository at this point
Copy the full SHA 44e4ea0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f83339 - Browse repository at this point
Copy the full SHA 9f83339View commit details -
Configuration menu - View commit details
-
Copy full SHA for 39216ad - Browse repository at this point
Copy the full SHA 39216adView commit details -
Configuration menu - View commit details
-
Copy full SHA for e045255 - Browse repository at this point
Copy the full SHA e045255View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3747e79 - Browse repository at this point
Copy the full SHA 3747e79View commit details
Commits on Feb 22, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 2fc70fb - Browse repository at this point
Copy the full SHA 2fc70fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for fa198ca - Browse repository at this point
Copy the full SHA fa198caView commit details -
Configuration menu - View commit details
-
Copy full SHA for c692830 - Browse repository at this point
Copy the full SHA c692830View commit details
Commits on Feb 23, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 7f2b076 - Browse repository at this point
Copy the full SHA 7f2b076View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9d3b5d5 - Browse repository at this point
Copy the full SHA 9d3b5d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3e533cd - Browse repository at this point
Copy the full SHA 3e533cdView commit details -
Co-Authored-By: Dilum Aluthge <dilum@aluthge.com>
Configuration menu - View commit details
-
Copy full SHA for 0d40342 - Browse repository at this point
Copy the full SHA 0d40342View commit details -
Configuration menu - View commit details
-
Copy full SHA for 626f8bc - Browse repository at this point
Copy the full SHA 626f8bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6104982 - Browse repository at this point
Copy the full SHA 6104982View commit details -
Configuration menu - View commit details
-
Copy full SHA for 31aae4d - Browse repository at this point
Copy the full SHA 31aae4dView commit details -
Add specialized sorting for Bool
Sorting used to be okay for booleans, but radix sort messed with the dispatch and made it up to 6 times slower in the worst edge case. Rather than deal with that dispatch, I added compile time dispatch to a specialized boolean sorting routine that works on arbitrary orderings and is twice as fast as what was previously in base.
Configuration menu - View commit details
-
Copy full SHA for 8a8f239 - Browse repository at this point
Copy the full SHA 8a8f239View commit details -
Immediately dispatch to sort_int_range! for long Vector{[U]Int8}
This is mostly noticable for lengths 257-1999 because they were previously dispatched to comparrison sort, skipping dispatch to sort_int_range! Also add comments.
Configuration menu - View commit details
-
Copy full SHA for 39a51cf - Browse repository at this point
Copy the full SHA 39a51cfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 10e4204 - Browse repository at this point
Copy the full SHA 10e4204View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2dfaa2d - Browse repository at this point
Copy the full SHA 2dfaa2dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 045869d - Browse repository at this point
Copy the full SHA 045869dView commit details -
restrict fpsort! policy on perm orderings to exclude Bool
Because a) indexing with a Bool is not valid and b) specialized Bool sorting is faster
Configuration menu - View commit details
-
Copy full SHA for 3abefaa - Browse repository at this point
Copy the full SHA 3abefaaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 758c026 - Browse repository at this point
Copy the full SHA 758c026View commit details -
Configuration menu - View commit details
-
Copy full SHA for 85fed57 - Browse repository at this point
Copy the full SHA 85fed57View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9a3f1c7 - Browse repository at this point
Copy the full SHA 9a3f1c7View commit details
Commits on Feb 24, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 3af1412 - Browse repository at this point
Copy the full SHA 3af1412View commit details
Commits on Feb 26, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 98aaa97 - Browse repository at this point
Copy the full SHA 98aaa97View commit details
Commits on Feb 27, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 0a93e4b - Browse repository at this point
Copy the full SHA 0a93e4bView commit details -
Configuration menu - View commit details
-
Copy full SHA for f4b3e3b - Browse repository at this point
Copy the full SHA f4b3e3bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 59706ad - Browse repository at this point
Copy the full SHA 59706adView commit details
Commits on Mar 1, 2022
-
Configuration menu - View commit details
-
Copy full SHA for c471af9 - Browse repository at this point
Copy the full SHA c471af9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 82e8f26 - Browse repository at this point
Copy the full SHA 82e8f26View commit details -
Configuration menu - View commit details
-
Copy full SHA for 41490eb - Browse repository at this point
Copy the full SHA 41490ebView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6eb4d77 - Browse repository at this point
Copy the full SHA 6eb4d77View commit details -
2.5% speedup on `@belapsed sort!(x) setup=(x=rand(Int, 2001))`
Configuration menu - View commit details
-
Copy full SHA for 592b814 - Browse repository at this point
Copy the full SHA 592b814View commit details
Commits on Mar 2, 2022
-
Configuration menu - View commit details
-
Copy full SHA for c5f0bf1 - Browse repository at this point
Copy the full SHA c5f0bf1View commit details
Commits on Mar 3, 2022
-
Configuration menu - View commit details
-
Copy full SHA for d88230b - Browse repository at this point
Copy the full SHA d88230bView commit details
Commits on Mar 4, 2022
-
Configuration menu - View commit details
-
Copy full SHA for ffcc043 - Browse repository at this point
Copy the full SHA ffcc043View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f9c0fc - Browse repository at this point
Copy the full SHA 5f9c0fcView commit details -
Add comments to radaix_sort! and make computationally negligable chan…
…ges to help the code match the explanation radix_sort! is not exported and only called with Int lo and hi values, so changing the eltype of counts to UInt should have no exported impact. I made this change a) to simplify slightly b) because unsigned fails for BitInt c) because line 715 can now overflow as of the previous commit, and if we are using a custom integer type, that might error. unsigned(hi-lo) gives a false illusion of generality.
Configuration menu - View commit details
-
Copy full SHA for 84cedaa - Browse repository at this point
Copy the full SHA 84cedaaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9283d75 - Browse repository at this point
Copy the full SHA 9283d75View commit details -
Configuration menu - View commit details
-
Copy full SHA for 06cfaae - Browse repository at this point
Copy the full SHA 06cfaaeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 291399e - Browse repository at this point
Copy the full SHA 291399eView commit details
Commits on Mar 5, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 1195798 - Browse repository at this point
Copy the full SHA 1195798View commit details -
Configuration menu - View commit details
-
Copy full SHA for 338f3f5 - Browse repository at this point
Copy the full SHA 338f3f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for a186c7f - Browse repository at this point
Copy the full SHA a186c7fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8896af2 - Browse repository at this point
Copy the full SHA 8896af2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 27b1656 - Browse repository at this point
Copy the full SHA 27b1656View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f01201 - Browse repository at this point
Copy the full SHA 5f01201View commit details -
Configuration menu - View commit details
-
Copy full SHA for f978728 - Browse repository at this point
Copy the full SHA f978728View commit details -
Configuration menu - View commit details
-
Copy full SHA for f03e4c5 - Browse repository at this point
Copy the full SHA f03e4c5View commit details
Commits on Mar 11, 2022
-
ln -> lenm1 mn -> v_min mx -> v_max rln -> v_range umn -> u_min umx -> u_max urln -> u_range
Configuration menu - View commit details
-
Copy full SHA for cf04241 - Browse repository at this point
Copy the full SHA cf04241View commit details -
Configuration menu - View commit details
-
Copy full SHA for 96c0b6e - Browse repository at this point
Copy the full SHA 96c0b6eView commit details
Commits on Mar 12, 2022
-
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
Configuration menu - View commit details
-
Copy full SHA for 67494a5 - Browse repository at this point
Copy the full SHA 67494a5View commit details
Commits on Mar 13, 2022
-
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
Configuration menu - View commit details
-
Copy full SHA for c344e82 - Browse repository at this point
Copy the full SHA c344e82View commit details -
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
Configuration menu - View commit details
-
Copy full SHA for 68fef15 - Browse repository at this point
Copy the full SHA 68fef15View commit details -
Configuration menu - View commit details
-
Copy full SHA for a94cfea - Browse repository at this point
Copy the full SHA a94cfeaView commit details -
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
Configuration menu - View commit details
-
Copy full SHA for 8d844bf - Browse repository at this point
Copy the full SHA 8d844bfView commit details -
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
Configuration menu - View commit details
-
Copy full SHA for 222f8e3 - Browse repository at this point
Copy the full SHA 222f8e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for a7d7f56 - Browse repository at this point
Copy the full SHA a7d7f56View commit details -
Apply suggestions from code review
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
Configuration menu - View commit details
-
Copy full SHA for 34c700c - Browse repository at this point
Copy the full SHA 34c700cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 18c56a9 - Browse repository at this point
Copy the full SHA 18c56a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 09162ae - Browse repository at this point
Copy the full SHA 09162aeView commit details -
Comment on count sort for Bool and add
@inbounds
`@inbounds` is a 1.8x speedup for sorting trues(10_000)
Configuration menu - View commit details
-
Copy full SHA for 5473b3c - Browse repository at this point
Copy the full SHA 5473b3cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 92f69fa - Browse repository at this point
Copy the full SHA 92f69faView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6275928 - Browse repository at this point
Copy the full SHA 6275928View commit details
Commits on Mar 14, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 5eca90a - Browse repository at this point
Copy the full SHA 5eca90aView commit details -
Remove compilation tricks and put upper limit on chunk_size
I couldn't verify performance gains from making CHUNK_SIZE and MASK known at compile time, so I'm trying to resist the urge to abuse the compiler. I also noticed this was 20% slower than SortingAlgorithms.jl's RadixSort for `@belapsed sort!(x) setup=(x=rand(Int, 3000000)) evals=1` because it used a chunk size of 13 which is too high. On my computer the best chunk size for that case is 10, and I couldn't find a size where higher than 10 was better than 10. Once I set max chunk size to 10, the 20% regression turned into a 2.5% regression, well within margin of error.
Configuration menu - View commit details
-
Copy full SHA for 17f45e8 - Browse repository at this point
Copy the full SHA 17f45e8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 32a3197 - Browse repository at this point
Copy the full SHA 32a3197View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4931881 - Browse repository at this point
Copy the full SHA 4931881View commit details -
decouple _extrema and out_of_order to eliminate overhead (and optimiz…
…ation) in cases where the existing methods are already very fast (i.e. short int range and short vectors)
Configuration menu - View commit details
-
Copy full SHA for 4d2e184 - Browse repository at this point
Copy the full SHA 4d2e184View commit details
Commits on Mar 15, 2022
-
Configuration menu - View commit details
-
Copy full SHA for de33146 - Browse repository at this point
Copy the full SHA de33146View commit details -
notes: source len ratio (>1 is regression) S = sort R = reverse a = almost float 40 .87 Int 40 .96 1:40 40 1.07 1:20 40 1.7 1:3 40 2.61 1:2 40 1.92 1:1 40 1.72 (1.734) S Int 40 .92 R Int 40 .92 aS Int 40 .84 aR Int 40 .93 (.9027) aR flo 40 .89 aS flo 40 .73 S floa 40 .77 R floa 40 .81 (.7979)
Configuration menu - View commit details
-
Copy full SHA for 5ff3f07 - Browse repository at this point
Copy the full SHA 5ff3f07View commit details -
Move second dispatch to insertion sort to after presorted detection
to address regressions for sorting reverse sorted or almost reverse sorted data. Detection cost 2-7%, only impacting sorting vectors longer than 40 and shorter than 3bits (e.g. `rand(Int, 100)`). Also put in all same detection for 128 bit types under direct order (free).
Configuration menu - View commit details
-
Copy full SHA for ef24550 - Browse repository at this point
Copy the full SHA ef24550View commit details
Commits on Mar 16, 2022
-
Configuration menu - View commit details
-
Copy full SHA for dad6a26 - Browse repository at this point
Copy the full SHA dad6a26View commit details -
Move submodule Sort.Serial to Sort and rename
serial
touint_map
`Serial` -> nothing, `serialize` -> `uint_map`, `deserialize` -> `uint_unmap`, `Serializable` -> `UIntMappable`?
Configuration menu - View commit details
-
Copy full SHA for 0bf35ab - Browse repository at this point
Copy the full SHA 0bf35abView commit details -
Configuration menu - View commit details
-
Copy full SHA for c80b3cd - Browse repository at this point
Copy the full SHA c80b3cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9a626d7 - Browse repository at this point
Copy the full SHA 9a626d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 701aa0a - Browse repository at this point
Copy the full SHA 701aa0aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 693adab - Browse repository at this point
Copy the full SHA 693adabView commit details -
Configuration menu - View commit details
-
Copy full SHA for 563a816 - Browse repository at this point
Copy the full SHA 563a816View commit details -
Configuration menu - View commit details
-
Copy full SHA for dceee48 - Browse repository at this point
Copy the full SHA dceee48View commit details -
Configuration menu - View commit details
-
Copy full SHA for 29442e7 - Browse repository at this point
Copy the full SHA 29442e7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f7d0d9 - Browse repository at this point
Copy the full SHA 5f7d0d9View commit details
Commits on Mar 17, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 070a48e - Browse repository at this point
Copy the full SHA 070a48eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 287013c - Browse repository at this point
Copy the full SHA 287013cView commit details
Commits on Mar 23, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 0581855 - Browse repository at this point
Copy the full SHA 0581855View commit details
Commits on Mar 31, 2022
-
Apply suggestions from code review
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
Configuration menu - View commit details
-
Copy full SHA for c07fb05 - Browse repository at this point
Copy the full SHA c07fb05View commit details -
Configuration menu - View commit details
-
Copy full SHA for d6087d0 - Browse repository at this point
Copy the full SHA d6087d0View commit details
Commits on Apr 2, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 609abee - Browse repository at this point
Copy the full SHA 609abeeView commit details