Skip to content

Commit

Permalink
Auto merge of #122102 - Urgau:optimize-symbol-integer, r=cjgillot
Browse files Browse the repository at this point in the history
Optimize `Symbol::integer` by utilizing in-place formatting

This PR optimize `Symbol::integer` by utilizing `itoa` in-place formatting instead of going through a dynamically allocated `String` and the format machinery.

<details>

For some context: I was profiling `rustc --check-cfg` with callgrind and due to the way we currently setup all the targets and we end-up calling `Symbol::integer` multiple times for all the targets. Using `itoa` reduced the number of instructions.

</details>
  • Loading branch information
bors committed Mar 9, 2024
2 parents 7218eb3 + 67e350f commit e0270c9
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit e0270c9

Please sign in to comment.