diff --git a/src/Format2.ps1 b/src/Format2.ps1 index 64df841ea..35bd93d40 100644 --- a/src/Format2.ps1 +++ b/src/Format2.ps1 @@ -122,11 +122,13 @@ function Format-Nicely2 ($Value, [switch]$Pretty, [int]$Depth = 0) { return Format-Type2 -Value $Value } - if (Is-DecimalNumber -Value $Value) { + # Inlined Is-DecimalNumber / Is-ScriptBlock to avoid a function call per formatted value on this + # hot dispatch path (used for every