mirror of
https://github.com/icsharpcode/ILSpy.git
synced 2026-10-12 02:15:58 +00:00
The loop preceding the parse has already proven that the tail consists solely of ASCII digits, so the Substring+int.TryParse pair only re-validated them at the cost of a throwaway string allocation. SplitName runs per variable and per reserved-name registration for every decompiled method, making this one of the hottest Substring call sites in the decompiler. Accumulating the digits inline keeps the TryParse overflow semantics (fall back to number=1 and the unchanged name) without allocating. Assisted-by: Claude:claude-fable-5:Claude Code