rust/src
bors d012d2f96e Auto merge of #109399 - petrochenkov:rendersort, r=GuillaumeGomez
rustdoc: Optimize impl sorting during rendering

This should fix the perf regression on [bitmaps-3.1.0](https://github.com/rust-lang/rustc-perf/tree/master/collector/compile-benchmarks/bitmaps-3.1.0) from https://github.com/rust-lang/rust/pull/107765.

The bitmaps crate has a lot of impls:
```rust
impl Bits for BitsImpl<1> { ... }
impl Bits for BitsImpl<2> { ... }
// ...
impl Bits for BitsImpl<1023> { ... }
impl Bits for BitsImpl<1024> { ... }
```
and the logic in `fn print_item` sorts them in natural order.

Before https://github.com/rust-lang/rust/pull/107765 the impls came in source order, which happened to be already sorted in the necessary way.
So the comparison function was called fewer times.

After https://github.com/rust-lang/rust/pull/107765 the impls came in "stable" order (based on def path hash).
So the comparison function was called more times to sort them.

The comparison function was terribly inefficient, so it caused a large perf regression.
This PR attempts to make it more efficient by using cached keys during sorting.
2023-03-24 23:41:53 +00:00
..
bootstrap Auto merge of #109497 - matthiaskrgr:rollup-6txuxm0, r=matthiaskrgr 2023-03-22 21:35:02 +00:00
ci Auto merge of #108355 - dpaoliello:dlltoolm, r=michaelwoerister 2023-03-23 09:51:32 +00:00
doc Rollup merge of #108629 - notriddle:notriddle/item-type-advanced, r=GuillaumeGomez 2023-03-24 01:22:03 +01:00
etc Rename src/etc/vscode_settings.json to rust_analyzer_settings.json 2023-03-01 22:58:05 +05:30
librustdoc Auto merge of #109399 - petrochenkov:rendersort, r=GuillaumeGomez 2023-03-24 23:41:53 +00:00
llvm-project@fd949f3034 Revert "Auto merge of #107224 - nikic:llvm-16, r=cuviper" 2023-03-18 23:49:24 +01:00
rustdoc-json-types fix inconsistent json outputs from rustdoc 2023-03-05 00:09:09 +03:00
tools Auto merge of #109566 - flip1995:clippyup, r=Manishearth 2023-03-24 18:40:19 +00:00
README.md Remove stale reference to the test suite location 2023-01-13 11:49:06 +00:00
stage0.json Bump to latest beta 2023-03-15 08:55:22 -04:00
version Bump version to 1.70.0 2023-03-04 10:10:46 -05:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.