-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 BracketedSort
a new, faster algorithm for partialsort
and friends
#52006
Commits on Oct 28, 2023
-
Lilith Hafner authored and Lilith Hafner committed
Oct 28, 2023 Configuration menu - View commit details
-
Copy full SHA for 9f4ad8b - Browse repository at this point
Copy the full SHA 9f4ad8bView commit details -
add fallback and remove instrumentation
Lilith Hafner authored and Lilith Hafner committedOct 28, 2023 Configuration menu - View commit details
-
Copy full SHA for e47321f - Browse repository at this point
Copy the full SHA e47321fView commit details -
add a faster, non-allocating version
Lilith Hafner authored and Lilith Hafner committedOct 28, 2023 Configuration menu - View commit details
-
Copy full SHA for c61e6c3 - Browse repository at this point
Copy the full SHA c61e6c3View commit details
Commits on Oct 29, 2023
-
Lilith Hafner authored and Lilith Hafner committed
Oct 29, 2023 Configuration menu - View commit details
-
Copy full SHA for 9093cb9 - Browse repository at this point
Copy the full SHA 9093cb9View commit details -
add tests and support target ranges
Lilith Hafner authored and Lilith Hafner committedOct 29, 2023 Configuration menu - View commit details
-
Copy full SHA for ca7bd59 - Browse repository at this point
Copy the full SHA ca7bd59View commit details -
Lilith Hafner authored and Lilith Hafner committed
Oct 29, 2023 Configuration menu - View commit details
-
Copy full SHA for a170fc7 - Browse repository at this point
Copy the full SHA a170fc7View commit details -
Lilith Hafner authored and Lilith Hafner committed
Oct 29, 2023 Configuration menu - View commit details
-
Copy full SHA for 8c6eff6 - Browse repository at this point
Copy the full SHA 8c6eff6View commit details
Commits on Nov 2, 2023
-
Merge branch 'master' into lh/fast-partialsort
Lilith Hafner authored and Lilith Hafner committedNov 2, 2023 Configuration menu - View commit details
-
Copy full SHA for 4a6fce7 - Browse repository at this point
Copy the full SHA 4a6fce7View commit details -
This commit speeds up my_partialsort! to be faster than it was before, but partialsort! is slower than any version of my_partialsort! julia> using Random; Random.seed!(1); x = rand(1000); hash(x) 0x13843e5a90ce1e51 julia> @Btime partialsort!(copy($x), 500); 3.838 μs (3 allocations: 7.88 KiB) julia> @Btime my_partialsort!(copy($x), 500); 1.946 μs (3 allocations: 7.88 KiB)
Lilith Hafner authored and Lilith Hafner committedNov 2, 2023 Configuration menu - View commit details
-
Copy full SHA for 1f1fc3b - Browse repository at this point
Copy the full SHA 1f1fc3bView commit details -
fix some bugs and fiddle with optimization passess (specifically disa…
…ble IEEE opt. because it makes the kernel slower)
Lilith Hafner authored and Lilith Hafner committedNov 2, 2023 Configuration menu - View commit details
-
Copy full SHA for 4aad01f - Browse repository at this point
Copy the full SHA 4aad01fView commit details -
a bit more fiddling. The remaining perforamnce gap is due to NaN safety
julia> using Random; Random.seed!(1); x = rand(1000); hash(x) 0x13843e5a90ce1e51 julia> @Btime partialsort!(copy($x), 500); 2.671 μs (3 allocations: 7.88 KiB) julia> @Btime my_partialsort!(copy($x), 500); 2.000 μs (3 allocations: 7.88 KiB) julia> @Btime partialsort!(copy($x), 500, lt=<); 1.733 μs (3 allocations: 7.88 KiB)
Lilith Hafner authored and Lilith Hafner committedNov 2, 2023 Configuration menu - View commit details
-
Copy full SHA for 8e66d4b - Browse repository at this point
Copy the full SHA 8e66d4bView commit details -
Lilith Hafner authored and Lilith Hafner committed
Nov 2, 2023 Configuration menu - View commit details
-
Copy full SHA for 5d07ffe - Browse repository at this point
Copy the full SHA 5d07ffeView commit details -
update comments and increase tries from 4 to 5
Lilith Hafner authored and Lilith Hafner committedNov 2, 2023 Configuration menu - View commit details
-
Copy full SHA for 0f81beb - Browse repository at this point
Copy the full SHA 0f81bebView commit details -
remove 'deleteme' development file
Lilith Hafner authored and Lilith Hafner committedNov 2, 2023 Configuration menu - View commit details
-
Copy full SHA for e1df36e - Browse repository at this point
Copy the full SHA e1df36eView commit details -
Merge branch 'master' into lh/fast-partialsort
Lilith Hafner authored and Lilith Hafner committedNov 2, 2023 Configuration menu - View commit details
-
Copy full SHA for 0ebef7e - Browse repository at this point
Copy the full SHA 0ebef7eView commit details -
Lilith Hafner authored and Lilith Hafner committed
Nov 2, 2023 Configuration menu - View commit details
-
Copy full SHA for 8003a0c - Browse repository at this point
Copy the full SHA 8003a0cView commit details
Commits on Nov 3, 2023
-
support non-unit-range targets
Lilith Hafner authored and Lilith Hafner committedNov 3, 2023 Configuration menu - View commit details
-
Copy full SHA for 8e933c3 - Browse repository at this point
Copy the full SHA 8e933c3View commit details -
bugfix TODO: add tests that catch this
Lilith Hafner authored and Lilith Hafner committedNov 3, 2023 Configuration menu - View commit details
-
Copy full SHA for 76d2833 - Browse repository at this point
Copy the full SHA 76d2833View commit details -
another bugfix (this one caught by CI)
Lilith Hafner authored and Lilith Hafner committedNov 3, 2023 Configuration menu - View commit details
-
Copy full SHA for 847172e - Browse repository at this point
Copy the full SHA 847172eView commit details -
Lilith Hafner authored and Lilith Hafner committed
Nov 3, 2023 Configuration menu - View commit details
-
Copy full SHA for 5a85c03 - Browse repository at this point
Copy the full SHA 5a85c03View commit details -
Lilith Hafner authored and Lilith Hafner committed
Nov 3, 2023 Configuration menu - View commit details
-
Copy full SHA for 86fc129 - Browse repository at this point
Copy the full SHA 86fc129View commit details -
Tweak dispatch to avoid >100% regressions on 39 element arrays & opti…
…mize scalar arithmetic to avoid >100% regression when taking fallback
Lilith Hafner authored and Lilith Hafner committedNov 3, 2023 Configuration menu - View commit details
-
Copy full SHA for a3a6c47 - Browse repository at this point
Copy the full SHA a3a6c47View commit details -
more performance characteristic tweaks (and a dynamic dispatch perfor…
…mance bugfix)
Lilith Hafner authored and Lilith Hafner committedNov 3, 2023 Configuration menu - View commit details
-
Copy full SHA for bda1b6d - Browse repository at this point
Copy the full SHA bda1b6dView commit details -
use standard optimizations for recursive calls
Lilith Hafner authored and Lilith Hafner committedNov 3, 2023 Configuration menu - View commit details
-
Copy full SHA for b2e4529 - Browse repository at this point
Copy the full SHA b2e4529View commit details -
cleanup, add comments, and admit weakness against inputs with duplica…
…tes, and remove type instability in crit-fail path
Lilith Hafner authored and Lilith Hafner committedNov 3, 2023 Configuration menu - View commit details
-
Copy full SHA for fd8d967 - Browse repository at this point
Copy the full SHA fd8d967View commit details -
make lots of duplicates non-pathological (still not great, but not te…
…rrible)
Lilith Hafner authored and Lilith Hafner committedNov 3, 2023 Configuration menu - View commit details
-
Copy full SHA for 8361184 - Browse repository at this point
Copy the full SHA 8361184View commit details -
fix some bugs (wow, we need better test coverage!) and add a dispatch…
… short-circuit to avoid dispatch overhead
Lilith Hafner authored and Lilith Hafner committedNov 3, 2023 Configuration menu - View commit details
-
Copy full SHA for 5d52194 - Browse repository at this point
Copy the full SHA 5d52194View commit details -
change offset from .5 to .7 (helps a huge amount for small to medium …
…sized input success rates)
Lilith Hafner authored and Lilith Hafner committedNov 3, 2023 Configuration menu - View commit details
-
Copy full SHA for 6f8048f - Browse repository at this point
Copy the full SHA 6f8048fView commit details -
noting that running a hundred benchmarks doesn't fail a single trial,…
… drop max trials to 3 and adjust comments
Lilith Hafner authored and Lilith Hafner committedNov 3, 2023 Configuration menu - View commit details
-
Copy full SHA for d0a38a2 - Browse repository at this point
Copy the full SHA d0a38a2View commit details -
implement NFC todo that requires rebuilding Julia
Lilith Hafner authored and Lilith Hafner committedNov 3, 2023 Configuration menu - View commit details
-
Copy full SHA for 52a6785 - Browse repository at this point
Copy the full SHA 52a6785View commit details -
Lilith Hafner authored and Lilith Hafner committed
Nov 3, 2023 Configuration menu - View commit details
-
Copy full SHA for 1d90487 - Browse repository at this point
Copy the full SHA 1d90487View commit details
Commits on Nov 4, 2023
-
check and document the invariant that makes the
@inbounds
s safeLilith Hafner authored and Lilith Hafner committedNov 4, 2023 Configuration menu - View commit details
-
Copy full SHA for 83c9e27 - Browse repository at this point
Copy the full SHA 83c9e27View commit details -
fix some unimportant off by one errors that have been bugging me
Lilith Hafner authored and Lilith Hafner committedNov 4, 2023 Configuration menu - View commit details
-
Copy full SHA for 0b2b399 - Browse repository at this point
Copy the full SHA 0b2b399View commit details -
Lilith Hafner authored and Lilith Hafner committed
Nov 4, 2023 Configuration menu - View commit details
-
Copy full SHA for 422a14b - Browse repository at this point
Copy the full SHA 422a14bView commit details -
micro-refactor to use more code sharing
Lilith Hafner authored and Lilith Hafner committedNov 4, 2023 Configuration menu - View commit details
-
Copy full SHA for ad82125 - Browse repository at this point
Copy the full SHA ad82125View commit details -
Avoid overflow and nfc refactor add comments, and variable rename for…
… readability
Lilith Hafner authored and Lilith Hafner committedNov 4, 2023 Configuration menu - View commit details
-
Copy full SHA for ccb5c99 - Browse repository at this point
Copy the full SHA ccb5c99View commit details -
randomize initial hash seed; use consistent recursive algorithms; add…
… tests
Lilith Hafner authored and Lilith Hafner committedNov 4, 2023 Configuration menu - View commit details
-
Copy full SHA for 650c6a2 - Browse repository at this point
Copy the full SHA 650c6a2View commit details -
REVERT ME: revert the re-introduction of PartialQuickSort
There are some pretty compelling reasons to use PartialQuickSort instead of ScratchQuickSort as a base case for BracketedSort. However, PartialQuickSort can segfault for invalid but seemingly innocuous lt functions. I don't want to talk about introducing segfaults to the default sorting algorithms or introducing a regression to PartialQuickSort in this PR Revert this commit it you want `partialsort!(::Vector{Int}, ::Int)` not to allocate.
Lilith Hafner authored and Lilith Hafner committedNov 4, 2023 Configuration menu - View commit details
-
Copy full SHA for 5c18e25 - Browse repository at this point
Copy the full SHA 5c18e25View commit details
Commits on Nov 5, 2023
-
implement Oscar's suggestion to speed up heuristic computation
Lilith Hafner authored and Lilith Hafner committedNov 5, 2023 Configuration menu - View commit details
-
Copy full SHA for 5657e5f - Browse repository at this point
Copy the full SHA 5657e5fView commit details
Commits on Nov 6, 2023
-
accept that invalid lt continues to work
Lilith Hafner authored and Lilith Hafner committedNov 6, 2023 Configuration menu - View commit details
-
Copy full SHA for 069c453 - Browse repository at this point
Copy the full SHA 069c453View commit details
Commits on Nov 22, 2023
-
Configuration menu - View commit details
-
Copy full SHA for eb86ec5 - Browse repository at this point
Copy the full SHA eb86ec5View commit details