about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/lints.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-05-28 02:47:32 +0000
committerbors <bors@rust-lang.org>2024-05-28 02:47:32 +0000
commitd86e1229411c086e1267c80dd9872959ca13b8b9 (patch)
tree5e04986bdc521b1a74e5909d7ac1745cc4344ca2 /compiler/rustc_lint/src/lints.rs
parent71213fd60700478ac9ddef2cb4ef43b7bb660a5b (diff)
parent05fa647dc7810a756a206d2300f12b3dafec779f (diff)
downloadrust-d86e1229411c086e1267c80dd9872959ca13b8b9.tar.gz
rust-d86e1229411c086e1267c80dd9872959ca13b8b9.zip
Auto merge of #125609 - diondokter:opt-size-char-count, r=thomcc
Always use the general case char count with `optimize_for_size`

The faster algo is really expensive, over a kilobyte if the full algo is present in a binary.
With this PR the general case algo is picked always instead of only for small strings.

In a test of mine this change makes the total binary go from 3116 bytes to 2032 bytes in opt-level 3 and from 1652 bytes to 1428 bytes in opt-level z. I've seen it much worse in real application, so the savings (especially on 'z') will be higher in many cases.

This is the second pr of this kind after #125606
Diffstat (limited to 'compiler/rustc_lint/src/lints.rs')
0 files changed, 0 insertions, 0 deletions