The following function compiles to ~900 bytes of code when jitted on x64.
privatestaticboolFormat(Span<byte>span,intvalue){returnUtf8Formatter.TryFormat(value,span,out_,newStandardFormat('D',2));}Adding AggressiveInlining to StandardFormat.ctor allows the JIT to reduce the TryFormat call to a single call to TryFormatUInt64D, resulting in a code size of less than 100 bytes.
The following function compiles to ~900 bytes of code when jitted on x64.
Adding
AggressiveInliningtoStandardFormat.ctorallows the JIT to reduce theTryFormatcall to a single call toTryFormatUInt64D, resulting in a code size of less than 100 bytes.