rust/src
bors f421586eed Auto merge of #109216 - martingms:unicode-case-lut-shrink, r=Mark-Simulacrum
Shrink unicode case-mapping LUTs by 24k

I was looking into the binary bloat of a small program using `str::to_lowercase` and `str::to_uppercase`, and noticed that the lookup tables used for case mapping had a lot of zero-bytes in them. The reason for this is that since some characters map to up to three other characters when lower or uppercased, the LUTs store a `[char; 3]` for each character. However, the vast majority of cases only map to a single new character, in other words most of the entries are e.g. `(lowerc, [upperc, '\0', '\0'])`.
This PR introduces a new encoding scheme for these tables.

The changes reduces the size of my test binary by about 24K.

I've also done some `#[bench]`marks on unicode-heavy test data, and found that the performance of both `str::to_lowercase` and `str::to_uppercase` improves by up to 20%. These measurements are obviously very dependent on the character distribution of the data.

Someone else will have to decide whether this more complex scheme is worth it or not, I was just goofing around a bit and here's what came out of it 🤷‍♂️ No hard feelings if this isn't wanted!
2023-03-24 10:33:42 +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 Rollup merge of #108629 - notriddle:notriddle/item-type-advanced, r=GuillaumeGomez 2023-03-24 01:22:03 +01: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 #109216 - martingms:unicode-case-lut-shrink, r=Mark-Simulacrum 2023-03-24 10:33:42 +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.