about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/errors.rs
diff options
context:
space:
mode:
authorJubilee <46493976+workingjubilee@users.noreply.github.com>2024-06-06 21:10:08 -0700
committerGitHub <noreply@github.com>2024-06-06 21:10:08 -0700
commitc6cdd457eb4be60bfef27298511ebfb29555d3c0 (patch)
tree17d4da08a8be5cd97998a2387959691803a996cf /compiler/rustc_codegen_llvm/src/errors.rs
parent76e7a0849c07d73e4d9afde8036ee8c450127cc8 (diff)
parentd32d1c1a2ef2451f2fd7a061bba933173a195938 (diff)
downloadrust-c6cdd457eb4be60bfef27298511ebfb29555d3c0.tar.gz
rust-c6cdd457eb4be60bfef27298511ebfb29555d3c0.zip
Rollup merge of #125606 - diondokter:opt-size-int-fmt, r=cuviper
Size optimize int formatting

Let's use the new feature flag!

This uses a simpler algorithm to format integers.
It is slower, but also smaller.
It also saves having to import the 200 byte rodata lookup table.

In a test of mine this saves ~300 bytes total of a cortex-m binary that does integer formatting.
For a 16KB device, that's almost 2%.

Note though that for opt-level 3 the text size actually grows by 116 bytes.
Still a win in total. I'm not sure why the generated code is bigger than the more fancy algo. Maybe the smaller algo lends itself more to inlining and duplicating?
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions