diff --git a/src/ExampleProject/Views/Home/Docs.cshtml b/src/ExampleProject/Views/Home/Docs.cshtml index 1b91857..31b3c02 100644 --- a/src/ExampleProject/Views/Home/Docs.cshtml +++ b/src/ExampleProject/Views/Home/Docs.cshtml @@ -522,7 +522,7 @@ options.CachedCustomSuffixes = new[] { The foundation layer containing all number formatting logic and performance optimizations.

@@ -1343,14 +1343,14 @@ public class HumanNumberErrorHandlingMiddleware

Performance Overview

- HumanNumbers is designed from the ground up for maximum performance with zero-allocation + HumanNumbers is designed from the ground up for maximum performance with Low-Allocation operations, Span<char> usage, and JIT optimizations. The library maintains consistent sub-microsecond formatting times even under high load.

-

Zero Allocation

+

Low Allocation

Stack-based formatting for most operations

@@ -1381,11 +1381,11 @@ public class HumanNumberErrorHandlingMiddleware

Memory & Allocation

- Zero-allocation design with stack-based operations: + Low-Allocation design with stack-based operations:

-
// Zero allocation for most operations
+                            
// Low Allocation for most operations
 Span buffer = stackalloc char[32];
 var success = 1500000.TryFormatHuman(buffer, out var written, out var result);
 // No heap allocation - result points to stack buffer
@@ -1402,7 +1402,7 @@ public static bool TryFormatHuman(
     out string result)
 {
     // Implementation uses stackalloc and Span
-    // Zero allocation when result fits in buffer
+    // Low Allocation when result fits in buffer
 }
@@ -1543,35 +1543,22 @@ public static void FormatBatch(

-
// BenchmarkDotNet results
-| Method                    | Mean      | Allocated |
-|--------------------------|----------|----------|
-| HumanNumbers.ToHuman      | 85.21 ns | 0 B      |
-| String.Format("N0")       | 342.15 ns| 96 B     |
-| ToString("N0")            | 287.43 ns| 96 B     |
-| CustomFormatter          | 156.78 ns| 32 B     |
-
-// Large dataset performance
-| Dataset Size | HumanNumbers | String.Format | Improvement |
-|--------------|---------------|--------------|-------------|
-| 1K items     | 0.085 ms      | 0.342 ms     | 4.0x        |
-| 10K items    | 0.852 ms      | 3.421 ms     | 4.0x        |
-| 100K items   | 8.521 ms      | 34.215 ms    | 4.0x        |
-| 1M items     | 85.21 ms      | 342.15 ms    | 4.0x        |
-
-// Memory allocation comparison
-| Operation          | HumanNumbers | Standard Format |
-|--------------------|---------------|-----------------|
-| Single format      | 0 B           | 96 B           |
-| 1K formats         | 0 B           | 93.75 KB       |
-| 1M formats         | 0 B           | 91.55 MB       |
+
// BenchmarkDotNet results (.NET 10.0 X64 RyuJIT)
+| Method                    | Scenario / Input | Mean      | Gen 0  | Allocated |
+|---------------------------|------------------|-----------|--------|-----------|
+| StandardScaled            | Naive (999,499)  | 78.33 ns  | 0.0026 | 80 B      |
+| ToHuman                   | Governed (999,499)| 172.79 ns| 0.0024 | 56 B      |
+| ToHuman (Span)            | Governed (999,499)| 152.09 ns| 0.0007 | 24 B      |
+| TryParse                  | $1.50M           | 50.86 ns  | -      | 0 B       |
+| ToHumanBytes              | 1024 Bytes       | 56.62 ns  | 0.0013 | 40 B      |
+| ToHumanWords              | 1234.56          | 322.15 ns | 0.0186 | 560 B     |
+| ToRoman                   | 2024             | 31.79 ns  | 0.0013 | 40 B      |

Benchmark Insights

- HumanNumbers consistently outperforms standard formatting by 4x while using zero memory. - The performance advantage increases with dataset size due to reduced GC pressure. + While HumanNumbers handles complex threshold and rounding logic that naive implementations often miss, it does so with a smaller memory footprint—reducing allocations from 80 B down to 56 B for standard formatting, and down to 24 B for Span-based paths. Parsing operations (TryParse) are entirely allocation-free (0 B).

@@ -1592,7 +1579,7 @@ public class TradingDashboard { foreach (var update in updates) { - // Zero allocation formatting for real-time display + // Low Allocation formatting for real-time display update.Price.TryFormatHuman(_buffer, out var written, out var formatted); DisplayPrice(update.Symbol, formatted); } @@ -1623,7 +1610,7 @@ public class FinancialController : ControllerBase { var portfolio = _service.GetPortfolio(id); - // Zero allocation JSON formatting + // Low Allocation JSON formatting return Ok(new { portfolio.Name, @@ -1653,9 +1640,18 @@ public class FinancialController : ControllerBase

Explore Samples

- Dive into real-world examples and implementation patterns: + We are actively developing real-world examples and implementation patterns. The following sample projects will be available in the GitHub repository soon:

+
+ + + +
+ Coming Soon: These sample projects are currently planned and are not yet available for download. +
+
+

Financial Dashboard

@@ -1684,7 +1680,7 @@ public class FinancialController : ControllerBase

High-Performance Systems

- Zero-allocation patterns for high-throughput scenarios. + Low-Allocation patterns for high-throughput scenarios.

  • Trading platforms
  • @@ -1787,7 +1783,7 @@ public class FinancialController : ControllerBase

    Development Guidelines

    - All contributions should maintain the library's core principles: zero-allocation performance, + All contributions should maintain the library's core principles: Low-Allocation performance, never-throw safety, and clean API design. Check the contributing guidelines for detailed requirements and the development setup process.

    @@ -1805,7 +1801,7 @@ public class FinancialController : ControllerBase

    Happy Formatting!

    - Join thousands of developers using HumanNumbers in production applications worldwide. + Join developers using HumanNumbers in production applications worldwide.

@@ -2512,3 +2508,4 @@ public class FinancialController : ControllerBase } } + diff --git a/src/ExampleProject/Views/Home/Index.cshtml b/src/ExampleProject/Views/Home/Index.cshtml index 3eeac10..a2eb496 100644 --- a/src/ExampleProject/Views/Home/Index.cshtml +++ b/src/ExampleProject/Views/Home/Index.cshtml @@ -15,9 +15,9 @@
v2.0.0-preview.1 + class="inline-flex items-center px-3 py-1 text-xs font-medium rounded-full bg-gray-100 dark:bg-gray-800 text-gray-800 dark:text-gray-300 border border-gray-200 dark:border-gray-700 bg-blue-600 text-white border-transparent">v2.0.0 Zero-Allocation + class="inline-flex items-center px-3 py-1 text-xs font-medium rounded-full bg-gray-100 dark:bg-gray-800 text-gray-800 dark:text-gray-300 border border-gray-200 dark:border-gray-700">Low-Allocation Culture-Aware
@@ -808,7 +808,7 @@

HumanNumbers - is optimized for zero-allocation hot paths using Span<char>

@@ -1480,4 +1480,4 @@ loadGlobalSupport(); }); -} \ No newline at end of file +} diff --git a/src/ExampleProject/Views/Shared/_Layout.cshtml b/src/ExampleProject/Views/Shared/_Layout.cshtml index 2614e0a..2cc05eb 100644 --- a/src/ExampleProject/Views/Shared/_Layout.cshtml +++ b/src/ExampleProject/Views/Shared/_Layout.cshtml @@ -167,10 +167,10 @@