]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Auto merge of #99487 - bmacnaughton:is_whitespace_updates, r=thomcc
authorbors <bors@rust-lang.org>
Fri, 26 Aug 2022 00:42:40 +0000 (00:42 +0000)
committerbors <bors@rust-lang.org>
Fri, 26 Aug 2022 00:42:40 +0000 (00:42 +0000)
commit76f3b891a0c48e128c5a43ef57e70d86735e1cf2
tree062d94b29a22f48ef4bfac341c9f6b2c4bd8443a
parentcfb5ae26a4496b7d35180f15e47ada0f3897c7e8
parent5d048eb69dc73aa6307f07ad6a21eee5e3e64c9f
Auto merge of #99487 - bmacnaughton:is_whitespace_updates, r=thomcc

is_whitespace() performance improvements

This is my first rust PR, so if I miss anything obvious please let me know and I'll do my best to fix it.

This was a bit more of a challenge than I realized because, while I made working code locally and tested it against the native `is_whitespace()`, this PR required changing `src/tools/unicode-table-generator`, the code that generated the code.

I have benchmarked this locally, using criterion, and have seen meaningful performance improvements. I can add those outputs to this if you'd like, but am guessing that the perf run that `@fmease` recommended is what's needed.

I have run ` ./x.py test --stage 0 library/std` after building it locally after executing `./x.py build library`. I didn't try to build the whole compiler, but maybe I should have - any guidance would be appreciated.

If this general approach makes sense, I'll take a look at some other candidate categories, e.g., `Cc`, in the future.

Oh, and I wasn't sure whether the generated code should be included in this PR or not. I did include it.