diff options
| author | bors <bors@rust-lang.org> | 2021-12-03 13:20:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-12-03 13:20:14 +0000 |
| commit | 2a9e0831d6603d87220cedd1b1293e2eb82ef55c (patch) | |
| tree | adc34a1951d77214c5f31dec639ab79ffbcb0810 /compiler/rustc_data_structures/src/sso/set.rs | |
| parent | d47a6cc3f2dab0ef046c2bb7b76a9ee8d1a0be92 (diff) | |
| parent | 1f147a2ed7671cacd8ab423d8979a1ccfa4443ab (diff) | |
| download | rust-2a9e0831d6603d87220cedd1b1293e2eb82ef55c.tar.gz rust-2a9e0831d6603d87220cedd1b1293e2eb82ef55c.zip | |
Auto merge of #91393 - Julian-Wollersberger:lexer_optimization, r=petrochenkov
Optimize `rustc_lexer` The `cursor.first()` method in `rustc_lexer` now calls the `chars.next()` method instead of `chars.nth_char(0)`. This allows LLVM to optimize the code better. The biggest win is that `eat_while()` is now fully inlined and generates better assembly. This improves the lexer's performance by 35% in a micro-benchmark I made (Lexing all 18MB of code in the compiler directory). But lexing is only a small part of the overall compilation time, so I don't know how significant it is. Big thanks to criterion and `cargo asm`.
Diffstat (limited to 'compiler/rustc_data_structures/src/sso/set.rs')
0 files changed, 0 insertions, 0 deletions
