diff options
| author | Taras Tsugrii <taras.tsugriy@gmail.com> | 2023-08-01 11:10:17 -0700 |
|---|---|---|
| committer | Taras Tsugrii <taras.tsugriy@gmail.com> | 2023-08-01 11:10:17 -0700 |
| commit | 64dfd1090d20d112038fecad7fcd2b988e372442 (patch) | |
| tree | 39542dbd5343b2c994a1030508190f529534077b /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 4896daa3985010e7d136fe0c5bf4c4e8bfc911ae (diff) | |
| download | rust-64dfd1090d20d112038fecad7fcd2b988e372442.tar.gz rust-64dfd1090d20d112038fecad7fcd2b988e372442.zip | |
[rustc_data_structures][base_n][perf] Remove unnecessary utf8 check.
Since all output characters taken from `BASE_64` are valid UTF8 chars
there is no need to waste cycles on validation.
Even though it's obviously a perf win, I've also used a [benchmark](https://gist.github.com/ttsugriy/e1e63c07927d8f31e71695a9c617bbf3)
on M1 MacBook Air with following results:
```
Running benches/base_n_benchmark.rs (target/release/deps/base_n_benchmark-825fe5895b5c2693)
push_str/old time: [14.670 µs 14.852 µs 15.074 µs]
Performance has regressed.
Found 11 outliers among 100 measurements (11.00%)
4 (4.00%) high mild
7 (7.00%) high severe
push_str/new time: [12.573 µs 12.674 µs 12.801 µs]
Performance has regressed.
Found 11 outliers among 100 measurements (11.00%)
7 (7.00%) high mild
4 (4.00%) high severe
```
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
