Comments (10)
Regarding how to communicate the performance improvements, saying ~2x for both stable and unstable sort is somewhat based in reality, however I'd much prefer not to mention a single number x or % improvement, as that depends on the input pattern, input length and input type, and we see in our testing changes ranging from no change at all, all the way up to 17x faster execution. I'd rather we say that the performance improved significantly and link to the relevant section in the design documents that explains our methodology and results for evaluating the change in performance slice::sort
and slice::sort_unstable
.
from rust.
cc @Voultapher @orlp if you want to have input on the relnotes here.
from rust.
Sketch for the compatibility aspect (not covering the details of the performance improvement):
The implementations of sort functions (sort
, sort_by
, sort_by_cached_key
, sort_by_key
, sort_unstable
, sort_unstable_by
, sort_unstable_by_key
) now have higher performance. These functions may now panic if the implementation of Ord
or the supplied comparison function is not a total order.
from rust.
select_nth_unstable
, select_nth_unstable_by
and select_nth_unstable_by_key
are also affected. Though we expect to see less impactful performance differences on x86-64, Arm however should see larger improvements as it sees larger improvements for the new unstable partition code.
from rust.
Should probably use these permalinks specifically:
- https://github.com/Voultapher/sort-research-rs/blob/28d0cf339f123bf34b3a2dcea4f5d52e1867cfe3/writeup/driftsort_introduction/text.md#efficient
- https://github.com/Voultapher/sort-research-rs/blob/28d0cf339f123bf34b3a2dcea4f5d52e1867cfe3/writeup/ipnsort_introduction/text.md#efficient
from rust.
Do we have any source of randomness in the unstable sort to ensure it's really unstable (like hashmaps)? If not the compat note could also mention that the order changed in case someone accidentally relied on it.
from rust.
No, we do not, it's deterministic within a version.
from rust.
...and yes, it was in fact the case that someone asserted on this order in a test and the test was regressed as a result.
from rust.
No, we do not, it's deterministic within a version.
We do right now. I don't know if we actually guarantee this, and perhaps we could in the future use randomness for e.g. pivot selection. It's a bit weird because the current stable "current implementation" notes mention determinism, but.. well, it's in the "current implementation" section, not general guarantees.
from rust.
Should probably use these permalinks specifically:
It can be useful to have the ability to fix typos. I plan on keeping these links stable.
from rust.
Related Issues (20)
- [Stable] Error performing operation: fully_perform when encountering a chain of associated types HOT 3
- rustc crashes when trying to look up a field in a struct with an unnamed field HOT 2
- Moving mutable borrows in/out of inferred types results in the compiler thinking they are moved as if they were owned values HOT 2
- Enhance Error Handling and Code Clarity in dummy_span.rs HOT 1
- Float docs do not define the set of "arithmetic" operations
- Can't use an associated type of a generic param in other generic param's default value HOT 1
- ICE: `debuginfo: Trying to create type name for unexpected type: CoroutineWitness`
- unpretty: `Unexpected def kind SyntheticCoroutineBody`
- rustdoc search: allow queries to end in ::
- rustdoc search: allow type-based search for constants and statics
- Tracking Issue for fmt-debug option
- rustdoc search: allow eliding the return value of function signatures in type based search
- Very long compilation time on Apple Silicon platform
- rustdoc search: path matches that skip segments should be deprioritized HOT 1
- Large amounts of repeated data in debug info HOT 1
- `./x.py test compiler/rustc_abi` no longer works HOT 2
- Invalid suggestion when using `serde` `serialize_with`
- rustdoc: copy code button obscures scraped example expand button
- internal compiler error: TyKind::Error constructed but no error reported, internal compiler error: TyKind::Error constructed but no error reported
- Next-gen Trait Solver does not implement Generic Const Expressions HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust.