mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
At the moment, the LLVM IR we generate for this fn is
define internal fastcc void @AstGen.numberLiteral ... {
Entry:
...
%16 = alloca %"fmt.parse_float.decimal.Decimal(f128)", align 8
...
That `Decimal` is huuuge! It stores
pub const max_digits = 11564;
digits: [max_digits]u8,
on the stack.
It comes from `convertSlow` function, which LLVM happily inlined,
despite it being the cold path. Forbid inlining that to not penalize
callers with excessive stack usage.
Backstory: I was looking for needles memcpys in TigerBeetle, and came up
with this copyhound.zig tool for doing just that:
|
||
|---|---|---|
| .. | ||
| common.zig | ||
| convert_eisel_lemire.zig | ||
| convert_fast.zig | ||
| convert_hex.zig | ||
| convert_slow.zig | ||
| decimal.zig | ||
| FloatInfo.zig | ||
| FloatStream.zig | ||
| parse.zig | ||
| parse_float.zig | ||