Skip to content

Commit

Permalink
Auto merge of #125609 - diondokter:opt-size-char-count, r=thomcc
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bors committed May 28, 2024
2 parents 94953b9 + 3c970d3 commit dc1076a
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit dc1076a

Please sign in to comment.