Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#125609 - diondokter:opt-size-char-count, r=th…
…omcc 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 rust-lang#125606
- Loading branch information