Evidence, not faith.
Choose .NET libraries with confidence using reproducible feature,
execution-time and allocation comparisons.
Open the interactive matrix → · How to read the results · Reproduce the results · Link to the matrix
| 7 CATEGORIES |
46 LIBRARIES |
80 SCENARIOS |
| Category | Leader | Libraries | Scenarios |
|---|---|---|---|
| CSV Processing | Sep | 4 | 10 |
| Dependency Injection | Pure.DI | 23 | 15 |
| JSON Serialization | System.Text.Json | 3 | 14 |
| Logging | Microsoft.Extensions.Logging | 6 | 8 |
| Object Mapping | Mapperly | 4 | 10 |
| Validation | Microsoft.Extensions.Validation | 4 | 10 |
| ZIP Archives | SharpZipLib | 3 | 13 |
- Correctness comes first. Every implementation is checked against the same feature contract before its benchmark results are compared.
- Lower is better. Overview charts show execution time and allocated memory together.
- The rating measures distance, not placings. In every scenario the fastest library scores 100 points and the one allocating least scores 100 more; four times slower is half the points, and an unsupported scenario scores nothing. A library's rating is the sum, so speed, economy and breadth all count and a narrow win cannot outweigh them.
- The Web application is the primary explorer. Use it to select libraries and switch between overview, features, benchmarks and environment details. Chrome and Edge can install it as a desktop application, with a shortcut per category.
The README is a generated snapshot of the reports committed to this repository.
Sep leads the current rating · 4 libraries · 10 scenarios
In every scenario the fastest library scores 100 points and the one allocating least scores 100 more; four times slower is half the points, and an unsupported scenario is worth nothing. Time and memory reach 1000 each here, so the maximum is 2000. See workflows/rating.md.
| # | Library | Scenarios | Time | Memory | Points | Group wins |
|---|---|---|---|---|---|---|
| 1 | Sep | 10/10 | 1000 | 1000 | 2000 | gold in Correctness, gold in Read, gold in Throughput, gold in Write |
| 2 | TinyCsvParser | 9/10 | 570 | 392 | 962 | silver in Correctness, silver in Read, bronze in Throughput |
| 3 | Sylvan.Data.Csv | 9/10 | 622 | 270 | 892 | silver in Throughput, silver in Write, bronze in Correctness, bronze in Read |
| 4 | CsvHelper | 10/10 | 236 | 212 | 449 | bronze in Write |
How the points were earned — every scenario, with the measurements behind it
Each row is one scenario. Best is the lowest result among the rated libraries
that completed it, and the points follow from the two figures beside them:
100 × √((best + step) / (result + step)), with a step of 1 ns for time and 24 B
for memory. A dash means the library did not complete the scenario, and it scores
nothing for it. Add the two Points columns over every scenario and you get the
rating above. The same breakdown appears as a hint on any points value in the
application.
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Read Simple Rows | 772.98 ns | 772.98 ns | 100 | 1.89 KB | 1.89 KB | 100 |
| Read Typed Records | 896.17 ns | 896.17 ns | 100 | 1.7 KB | 1.7 KB | 100 |
| Read Large Dataset | 986.3 μs | 986.3 μs | 100 | 1016.97 KB | 1016.97 KB | 100 |
| Quoted Fields | 603.19 ns | 603.19 ns | 100 | 1.34 KB | 1.34 KB | 100 |
| Escaped Delimiters | 584.36 ns | 584.36 ns | 100 | 1.35 KB | 1.35 KB | 100 |
| Header Mapping | 904.75 ns | 904.75 ns | 100 | 1.7 KB | 1.7 KB | 100 |
| Custom Conversion | 468.55 ns | 468.55 ns | 100 | 1.11 KB | 1.11 KB | 100 |
| Streaming Read | 824.81 μs | 824.81 μs | 100 | 1.34 KB | 1.34 KB | 100 |
| Write Rows | 531.82 ns | 531.82 ns | 100 | 1.89 KB | 1.89 KB | 100 |
| Async Read | 836.01 μs | 836.01 μs | 100 | 1.44 KB | 1.44 KB | 100 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Read Simple Rows | 1.58 μs | 772.98 ns | 70 | 5.56 KB | 1.89 KB | 58.5 |
| Read Typed Records | 1.83 μs | 896.17 ns | 70 | 5.3 KB | 1.7 KB | 56.8 |
| Read Large Dataset | 2.99 ms | 986.3 μs | 57.5 | 2.91 MB | 1016.97 KB | 58.5 |
| Quoted Fields | 1.34 μs | 603.19 ns | 67.2 | 4.87 KB | 1.34 KB | 52.9 |
| Escaped Delimiters | 1.35 μs | 584.36 ns | 65.8 | 4.98 KB | 1.35 KB | 52.4 |
| Header Mapping | 1.85 μs | 904.75 ns | 69.9 | 5.3 KB | 1.7 KB | 56.8 |
| Custom Conversion | 891.92 ns | 468.55 ns | 72.5 | 4.32 KB | 1.11 KB | 51.1 |
| Streaming Read | 3.19 ms | 824.81 μs | 50.9 | 2.75 MB | 1.34 KB | 2.196 |
| Write Rows | — | 531.82 ns | 0 | — | 1.89 KB | 0 |
| Async Read | 3.93 ms | 836.01 μs | 46.1 | 1.39 MB | 1.44 KB | 3.209 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Read Simple Rows | 2.34 μs | 772.98 ns | 57.5 | 35.38 KB | 1.89 KB | 23.3 |
| Read Typed Records | 2.51 μs | 896.17 ns | 59.8 | 35.11 KB | 1.7 KB | 22.1 |
| Read Large Dataset | 1.21 ms | 986.3 μs | 90.2 | 1.03 MB | 1016.97 KB | 98.4 |
| Quoted Fields | 1.93 μs | 603.19 ns | 55.9 | 34.34 KB | 1.34 KB | 19.9 |
| Escaped Delimiters | 1.9 μs | 584.36 ns | 55.5 | 34.3 KB | 1.35 KB | 20 |
| Header Mapping | 2.66 μs | 904.75 ns | 58.4 | 35.11 KB | 1.7 KB | 22.1 |
| Custom Conversion | — | 468.55 ns | 0 | — | 1.11 KB | 0 |
| Streaming Read | 856.05 μs | 824.81 μs | 98.2 | 34.75 KB | 1.34 KB | 19.8 |
| Write Rows | 1.57 μs | 531.82 ns | 58.2 | 32.78 KB | 1.89 KB | 24.2 |
| Async Read | 1.07 ms | 836.01 μs | 88.5 | 36.05 KB | 1.44 KB | 20.1 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Read Simple Rows | 3.46 μs | 772.98 ns | 47.3 | 21.95 KB | 1.89 KB | 29.5 |
| Read Typed Records | 800.71 μs | 896.17 ns | 3.347 | 53.48 KB | 1.7 KB | 17.9 |
| Read Large Dataset | 4.79 ms | 986.3 μs | 45.4 | 2.65 MB | 1016.97 KB | 61.3 |
| Quoted Fields | 536.73 μs | 603.19 ns | 3.355 | 40.96 KB | 1.34 KB | 18.3 |
| Escaped Delimiters | 535.42 μs | 584.36 ns | 3.306 | 40.85 KB | 1.35 KB | 18.3 |
| Header Mapping | 896.77 μs | 904.75 ns | 3.178 | 53.68 KB | 1.7 KB | 17.9 |
| Custom Conversion | 3.08 μs | 468.55 ns | 39 | 21.95 KB | 1.11 KB | 22.7 |
| Streaming Read | 4.03 ms | 824.81 μs | 45.2 | 2.39 MB | 1.34 KB | 2.358 |
| Write Rows | 774.77 μs | 531.82 ns | 2.622 | 40.7 KB | 1.89 KB | 21.7 |
| Async Read | 4.39 ms | 836.01 μs | 43.7 | 2.39 MB | 1.44 KB | 2.442 |
Read
Compared libraries (4)
| CsvHelper 33.1.0 A widely used CSV library with record mapping, type conversion, and synchronous and asynchronous readers and writers. |
Compare → | |
| Sep 0.15.1 A modern SIMD-accelerated separated-values reader and writer with span-based conversion and async enumeration. |
Compare → | |
| Sylvan.Data.Csv 1.4.4 A high-performance forward-only CSV data reader and writer with strongly typed accessors and asynchronous I/O. |
Compare → | |
| TinyCsvParser 3.0.11 A strongly typed CSV parser with declarative property mapping, custom converters, lazy streaming, and asynchronous readers. |
Compare → |
Benchmark scenarios (10)
Parses three CSV records and materializes every field as text.
Parses three CSV records and materializes typed scalar values.
Parses and materializes 10,000 typed CSV records.
Parses doubled quote escapes inside quoted CSV fields.
Parses quoted fields containing a comma or an LF newline.
Maps a reordered CSV header to the correct typed record members.
Converts sku-NNNN fields to the matrix-owned ProductCode value type.
Aggregates 10,000 typed rows with forward-only reading and no row materialization.
Writes three records with a header to an exact LF-terminated CSV string.
Asynchronously aggregates 10,000 typed CSV rows through the library async API.
Pure.DI leads the current rating · 23 libraries · 15 scenarios
In every scenario the fastest library scores 100 points and the one allocating least scores 100 more; four times slower is half the points, and an unsupported scenario is worth nothing. Time and memory reach 1500 each here, so the maximum is 3000. See workflows/rating.md.
| # | Library | Scenarios | Time | Memory | Points | Group wins |
|---|---|---|---|---|---|---|
| 1 | Pure.DI | 14/15 | 1400 | 1365 | 2765 | gold in Basic, gold in Prepare, silver in Advanced |
| 2 | DryIoc | 15/15 | 866 | 1150 | 2016 | gold in Advanced, bronze in Prepare |
| 3 | Grace | 13/15 | 846 | 1045 | 1891 | silver in Basic |
| 4 | Stashbox | 14/15 | 788 | 1097 | 1885 | bronze in Advanced, bronze in Basic |
| 5 | Simple Injector | 12/15 | 720 | 965 | 1685 | |
| 6 | LightInject | 12/15 | 637 | 932 | 1569 | |
| 7 | Lamar | 12/15 | 631 | 745 | 1375 | |
| 8 | Singularity | 9/15 | 529 | 714 | 1243 | |
| 9 | Microsoft Extensions Dependency Injection | 9/15 | 459 | 681 | 1140 | |
| 10 | Faster.Ioc | 8/15 | 457 | 614 | 1071 | |
| 11 | Managed Extensibility Framework 2 | 10/15 | 355 | 457 | 812 | |
| 12 | Unity | 13/15 | 273 | 447 | 720 | |
| 13 | Maestro | 11/15 | 263 | 350 | 613 | |
| 14 | StructureMap | 13/15 | 218 | 333 | 550 | |
| 15 | ZenIoc | 7/15 | 152 | 291 | 443 | |
| 16 | Autofac | 13/15 | 170 | 245 | 415 | |
| 17 | Spring.NET | 10/15 | 125 | 270 | 395 | |
| 18 | Castle Windsor | 13/15 | 132 | 225 | 357 | |
| 19 | MvvmCross | 6/15 | 92 | 254 | 346 | silver in Prepare |
| 20 | Ninject | 12/15 | 55 | 135 | 191 | |
| 21 | Catel | 8/15 | 51 | 93 | 144 | |
| 22 | Visual Studio MEF | 9/15 | 40 | 100 | 140 |
How the points were earned — every scenario, with the measurements behind it
Each row is one scenario. Best is the lowest result among the rated libraries
that completed it, and the points follow from the two figures beside them:
100 × √((best + step) / (result + step)), with a step of 1 ns for time and 24 B
for memory. A dash means the library did not complete the scenario, and it scores
nothing for it. Add the two Points columns over every scenario and you get the
rating above. The same breakdown appears as a hint on any points value in the
application.
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Singleton | 1.49 ns | 1.49 ns | 100 | 0 B | 0 B | 100 |
| Transient | 18.06 ns | 18.06 ns | 100 | 72 B | 72 B | 100 |
| PerResolve | 14.26 ns | 14.26 ns | 100 | 56 B | 56 B | 100 |
| Scoped | 48.01 ns | 48.01 ns | 100 | 184 B | 160 B | 94.1 |
| Combined | 44.51 ns | 44.51 ns | 100 | 168 B | 168 B | 100 |
| Complex | 95.94 ns | 95.94 ns | 100 | 360 B | 360 B | 100 |
| Property | 73.67 ns | 73.67 ns | 100 | 336 B | 336 B | 100 |
| Generics | 32.13 ns | 32.13 ns | 100 | 144 B | 144 B | 100 |
| IEnumerable | 48.05 ns | 48.05 ns | 100 | 168 B | 72 B | 70.7 |
| Array | 137.09 ns | 137.09 ns | 100 | 624 B | 624 B | 100 |
| Conditional | 35.89 ns | 35.89 ns | 100 | 144 B | 144 B | 100 |
| Child Container | — | 717.55 ns | 0 | — | 1.59 KB | 0 |
| Interception With Proxy | 75.07 ns | 75.07 ns | 100 | 248 B | 248 B | 100 |
| Prepare And Register | 7.31 ns | 7.31 ns | 100 | 64 B | 64 B | 100 |
| Prepare And Register And Simple Resolve | 6.37 ns | 6.37 ns | 100 | 24 B | 24 B | 100 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Singleton | 37.12 ns | 1.49 ns | 25.6 | 0 B | 0 B | 100 |
| Transient | 50.47 ns | 18.06 ns | 60.9 | 72 B | 72 B | 100 |
| PerResolve | 502.92 μs | 14.26 ns | 0.551 | 1.65 KB | 56 B | 21.6 |
| Scoped | 169.38 ns | 48.01 ns | 53.6 | 448 B | 160 B | 62.4 |
| Combined | 83.79 ns | 44.51 ns | 73.3 | 168 B | 168 B | 100 |
| Complex | 126.4 ns | 95.94 ns | 87.2 | 360 B | 360 B | 100 |
| Property | 116.65 ns | 73.67 ns | 79.7 | 336 B | 336 B | 100 |
| Generics | 70.28 ns | 32.13 ns | 68.2 | 144 B | 144 B | 100 |
| IEnumerable | 205.94 ns | 48.05 ns | 48.7 | 768 B | 72 B | 34.8 |
| Array | 172.88 ns | 137.09 ns | 89.1 | 624 B | 624 B | 100 |
| Conditional | 72.27 ns | 35.89 ns | 71 | 144 B | 144 B | 100 |
| Child Container | 717.55 ns | 717.55 ns | 100 | 1.59 KB | 1.59 KB | 100 |
| Interception With Proxy | 85.29 ns | 75.07 ns | 93.9 | 248 B | 248 B | 100 |
| Prepare And Register | 1.29 μs | 7.31 ns | 8.013 | 2.42 KB | 64 B | 18.7 |
| Prepare And Register And Simple Resolve | 1.63 μs | 6.37 ns | 6.711 | 3.04 KB | 24 B | 12.4 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Singleton | 20.02 ns | 1.49 ns | 34.4 | 0 B | 0 B | 100 |
| Transient | 33.68 ns | 18.06 ns | 74.1 | 72 B | 72 B | 100 |
| PerResolve | 107.68 ns | 14.26 ns | 37.5 | 296 B | 56 B | 50 |
| Scoped | 116.11 ns | 48.01 ns | 64.7 | 232 B | 160 B | 84.8 |
| Combined | 55.42 ns | 44.51 ns | 89.8 | 168 B | 168 B | 100 |
| Complex | 112.55 ns | 95.94 ns | 92.4 | 360 B | 360 B | 100 |
| Property | 89.75 ns | 73.67 ns | 90.7 | 336 B | 336 B | 100 |
| Generics | 50.3 ns | 32.13 ns | 80.4 | 144 B | 144 B | 100 |
| IEnumerable | — | 48.05 ns | 0 | — | 72 B | 0 |
| Array | 151.65 ns | 137.09 ns | 95.1 | 624 B | 624 B | 100 |
| Conditional | 49.17 ns | 35.89 ns | 85.7 | 144 B | 144 B | 100 |
| Child Container | — | 717.55 ns | 0 | — | 1.59 KB | 0 |
| Interception With Proxy | 79 ns | 75.07 ns | 97.5 | 248 B | 248 B | 100 |
| Prepare And Register | 10.43 μs | 7.31 ns | 2.823 | 21.66 KB | 64 B | 6.296 |
| Prepare And Register And Simple Resolve | 198.69 μs | 6.37 ns | 0.609 | 32.77 KB | 24 B | 3.781 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Singleton | 52.85 ns | 1.49 ns | 21.5 | 0 B | 0 B | 100 |
| Transient | 44.48 ns | 18.06 ns | 64.7 | 72 B | 72 B | 100 |
| PerResolve | 66.09 ns | 14.26 ns | 47.7 | 192 B | 56 B | 60.9 |
| Scoped | 117.55 ns | 48.01 ns | 64.3 | 304 B | 160 B | 74.9 |
| Combined | 76.32 ns | 44.51 ns | 76.7 | 168 B | 168 B | 100 |
| Complex | 192.92 ns | 95.94 ns | 70.7 | 360 B | 360 B | 100 |
| Property | 99.38 ns | 73.67 ns | 86.2 | 336 B | 336 B | 100 |
| Generics | 59.06 ns | 32.13 ns | 74.3 | 144 B | 144 B | 100 |
| IEnumerable | — | 48.05 ns | 0 | — | 72 B | 0 |
| Array | 161.08 ns | 137.09 ns | 92.3 | 624 B | 624 B | 100 |
| Conditional | 59.11 ns | 35.89 ns | 78.3 | 144 B | 144 B | 100 |
| Child Container | 89.22 μs | 717.55 ns | 8.974 | 7.59 KB | 1.59 KB | 46 |
| Interception With Proxy | 78.95 ns | 75.07 ns | 97.5 | 248 B | 248 B | 100 |
| Prepare And Register | 4.77 μs | 7.31 ns | 4.175 | 8.77 KB | 64 B | 9.888 |
| Prepare And Register And Simple Resolve | 202.77 μs | 6.37 ns | 0.603 | 14.93 KB | 24 B | 5.599 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Singleton | 36.05 ns | 1.49 ns | 25.9 | 0 B | 0 B | 100 |
| Transient | 49.42 ns | 18.06 ns | 61.5 | 72 B | 72 B | 100 |
| PerResolve | — | 14.26 ns | 0 | — | 56 B | 0 |
| Scoped | 219.56 ns | 48.01 ns | 47.1 | 504 B | 160 B | 59 |
| Combined | 68.8 ns | 44.51 ns | 80.7 | 168 B | 168 B | 100 |
| Complex | 125.91 ns | 95.94 ns | 87.4 | 360 B | 360 B | 100 |
| Property | 112.37 ns | 73.67 ns | 81.2 | 336 B | 336 B | 100 |
| Generics | 61.36 ns | 32.13 ns | 72.9 | 144 B | 144 B | 100 |
| IEnumerable | 58.6 ns | 48.05 ns | 90.7 | 72 B | 72 B | 100 |
| Array | — | 137.09 ns | 0 | — | 624 B | 0 |
| Conditional | 62.65 ns | 35.89 ns | 76.1 | 144 B | 144 B | 100 |
| Child Container | — | 717.55 ns | 0 | — | 1.59 KB | 0 |
| Interception With Proxy | 83.66 ns | 75.07 ns | 94.8 | 248 B | 248 B | 100 |
| Prepare And Register | 65.85 μs | 7.31 ns | 1.124 | 63.48 KB | 64 B | 3.679 |
| Prepare And Register And Simple Resolve | 261.74 μs | 6.37 ns | 0.531 | 105.42 KB | 24 B | 2.108 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Singleton | 59.77 ns | 1.49 ns | 20.2 | 0 B | 0 B | 100 |
| Transient | 38.4 ns | 18.06 ns | 69.6 | 72 B | 72 B | 100 |
| PerResolve | — | 14.26 ns | 0 | — | 56 B | 0 |
| Scoped | 244.48 ns | 48.01 ns | 44.7 | 568 B | 160 B | 55.8 |
| Combined | 95.41 ns | 44.51 ns | 68.7 | 168 B | 168 B | 100 |
| Complex | 277.09 ns | 95.94 ns | 59 | 360 B | 360 B | 100 |
| Property | 93.99 ns | 73.67 ns | 88.7 | 336 B | 336 B | 100 |
| Generics | 55.96 ns | 32.13 ns | 76.3 | 144 B | 144 B | 100 |
| IEnumerable | — | 48.05 ns | 0 | — | 72 B | 0 |
| Array | 158.75 ns | 137.09 ns | 93 | 624 B | 624 B | 100 |
| Conditional | 147.27 ns | 35.89 ns | 49.9 | 144 B | 144 B | 100 |
| Child Container | — | 717.55 ns | 0 | — | 1.59 KB | 0 |
| Interception With Proxy | 187.91 ns | 75.07 ns | 63.5 | 560 B | 248 B | 68.2 |
| Prepare And Register | 10.27 μs | 7.31 ns | 2.846 | 33.07 KB | 64 B | 5.096 |
| Prepare And Register And Simple Resolve | 692.86 μs | 6.37 ns | 0.326 | 43.45 KB | 24 B | 3.284 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Singleton | 45.01 ns | 1.49 ns | 23.3 | 120 B | 0 B | 40.8 |
| Transient | 71.38 ns | 18.06 ns | 51.3 | 192 B | 72 B | 66.7 |
| PerResolve | — | 14.26 ns | 0 | — | 56 B | 0 |
| Scoped | 1.18 μs | 48.01 ns | 20.4 | 1.08 KB | 160 B | 40.4 |
| Combined | 87.32 ns | 44.51 ns | 71.8 | 288 B | 168 B | 78.4 |
| Complex | 141.86 ns | 95.94 ns | 82.4 | 480 B | 360 B | 87.3 |
| Property | 122.94 ns | 73.67 ns | 77.6 | 456 B | 336 B | 86.6 |
| Generics | 83 ns | 32.13 ns | 62.8 | 264 B | 144 B | 76.4 |
| IEnumerable | — | 48.05 ns | 0 | — | 72 B | 0 |
| Array | 185.01 ns | 137.09 ns | 86.2 | 744 B | 624 B | 91.9 |
| Conditional | 80.99 ns | 35.89 ns | 67.1 | 264 B | 144 B | 76.4 |
| Child Container | — | 717.55 ns | 0 | — | 1.59 KB | 0 |
| Interception With Proxy | 100.66 ns | 75.07 ns | 86.5 | 288 B | 248 B | 93.4 |
| Prepare And Register | 136.16 μs | 7.31 ns | 0.781 | 62.91 KB | 64 B | 3.695 |
| Prepare And Register And Simple Resolve | 144.11 μs | 6.37 ns | 0.715 | 63.64 KB | 24 B | 2.713 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Singleton | 18.81 ns | 1.49 ns | 35.5 | 0 B | 0 B | 100 |
| Transient | 37.08 ns | 18.06 ns | 70.8 | 72 B | 72 B | 100 |
| PerResolve | — | 14.26 ns | 0 | — | 56 B | 0 |
| Scoped | 54.49 ns | 48.01 ns | 94 | 160 B | 160 B | 100 |
| Combined | 56.5 ns | 44.51 ns | 89 | 168 B | 168 B | 100 |
| Complex | 124.16 ns | 95.94 ns | 88 | 360 B | 360 B | 100 |
| Property | — | 73.67 ns | 0 | — | 336 B | 0 |
| Generics | 55.73 ns | 32.13 ns | 76.4 | 144 B | 144 B | 100 |
| IEnumerable | — | 48.05 ns | 0 | — | 72 B | 0 |
| Array | 279.38 ns | 137.09 ns | 70.2 | 624 B | 624 B | 100 |
| Conditional | — | 35.89 ns | 0 | — | 144 B | 0 |
| Child Container | — | 717.55 ns | 0 | — | 1.59 KB | 0 |
| Interception With Proxy | — | 75.07 ns | 0 | — | 248 B | 0 |
| Prepare And Register | 5.48 μs | 7.31 ns | 3.895 | 12.49 KB | 64 B | 8.286 |
| Prepare And Register And Simple Resolve | 38.41 μs | 6.37 ns | 1.385 | 15.67 KB | 24 B | 5.465 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Singleton | 30.58 ns | 1.49 ns | 28.1 | 0 B | 0 B | 100 |
| Transient | 41.22 ns | 18.06 ns | 67.2 | 72 B | 72 B | 100 |
| PerResolve | — | 14.26 ns | 0 | — | 56 B | 0 |
| Scoped | 182.77 ns | 48.01 ns | 51.6 | 472 B | 160 B | 60.9 |
| Combined | 61.45 ns | 44.51 ns | 85.4 | 168 B | 168 B | 100 |
| Complex | 125.94 ns | 95.94 ns | 87.4 | 360 B | 360 B | 100 |
| Property | — | 73.67 ns | 0 | — | 336 B | 0 |
| Generics | 67.5 ns | 32.13 ns | 69.5 | 144 B | 144 B | 100 |
| IEnumerable | — | 48.05 ns | 0 | — | 72 B | 0 |
| Array | — | 137.09 ns | 0 | — | 624 B | 0 |
| Conditional | 114.96 ns | 35.89 ns | 56.4 | 144 B | 144 B | 100 |
| Child Container | — | 717.55 ns | 0 | — | 1.59 KB | 0 |
| Interception With Proxy | — | 75.07 ns | 0 | — | 248 B | 0 |
| Prepare And Register | 1.68 μs | 7.31 ns | 7.04 | 6.05 KB | 64 B | 11.9 |
| Prepare And Register And Simple Resolve | 2.09 μs | 6.37 ns | 5.939 | 6.8 KB | 24 B | 8.29 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Singleton | 24.12 ns | 1.49 ns | 31.5 | 0 B | 0 B | 100 |
| Transient | 35.6 ns | 18.06 ns | 72.2 | 72 B | 72 B | 100 |
| PerResolve | — | 14.26 ns | 0 | — | 56 B | 0 |
| Scoped | 65.93 ns | 48.01 ns | 85.6 | 192 B | 160 B | 92.3 |
| Combined | 59.52 ns | 44.51 ns | 86.7 | 168 B | 168 B | 100 |
| Complex | 112.85 ns | 95.94 ns | 92.3 | 360 B | 360 B | 100 |
| Property | — | 73.67 ns | 0 | — | 336 B | 0 |
| Generics | 51.44 ns | 32.13 ns | 79.5 | 144 B | 144 B | 100 |
| IEnumerable | — | 48.05 ns | 0 | — | 72 B | 0 |
| Array | — | 137.09 ns | 0 | — | 624 B | 0 |
| Conditional | — | 35.89 ns | 0 | — | 144 B | 0 |
| Child Container | — | 717.55 ns | 0 | — | 1.59 KB | 0 |
| Interception With Proxy | — | 75.07 ns | 0 | — | 248 B | 0 |
| Prepare And Register | 1.19 μs | 7.31 ns | 8.364 | 4.36 KB | 64 B | 14 |
| Prepare And Register And Simple Resolve | 106.25 μs | 6.37 ns | 0.833 | 7.46 KB | 24 B | 7.915 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Singleton | 134.25 ns | 1.49 ns | 13.6 | 360 B | 0 B | 25 |
| Transient | 109.62 ns | 18.06 ns | 41.5 | 312 B | 72 B | 53.5 |
| PerResolve | — | 14.26 ns | 0 | — | 56 B | 0 |
| Scoped | — | 48.01 ns | 0 | — | 160 B | 0 |
| Combined | 184.94 ns | 44.51 ns | 49.5 | 528 B | 168 B | 59 |
| Complex | 415.36 ns | 95.94 ns | 48.3 | 1.05 KB | 360 B | 59 |
| Property | 334.35 ns | 73.67 ns | 47.2 | 1.15 KB | 336 B | 54.8 |
| Generics | 127.43 ns | 32.13 ns | 50.8 | 384 B | 144 B | 64.2 |
| IEnumerable | — | 48.05 ns | 0 | — | 72 B | 0 |
| Array | 524.37 ns | 137.09 ns | 51.3 | 1.27 KB | 624 B | 70.1 |
| Conditional | 137.98 ns | 35.89 ns | 51.5 | 384 B | 144 B | 64.2 |
| Child Container | — | 717.55 ns | 0 | — | 1.59 KB | 0 |
| Interception With Proxy | — | 75.07 ns | 0 | — | 248 B | 0 |
| Prepare And Register | 103.5 μs | 7.31 ns | 0.896 | 44.44 KB | 64 B | 4.396 |
| Prepare And Register And Simple Resolve | 254.74 μs | 6.37 ns | 0.538 | 56.7 KB | 24 B | 2.875 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Singleton | 140.84 ns | 1.49 ns | 13.3 | 336 B | 0 B | 25.8 |
| Transient | 214.73 ns | 18.06 ns | 29.7 | 408 B | 72 B | 47.1 |
| PerResolve | 301.91 ns | 14.26 ns | 22.4 | 808 B | 56 B | 31 |
| Scoped | 1.94 μs | 48.01 ns | 15.9 | 4.57 KB | 160 B | 19.8 |
| Combined | 527.16 ns | 44.51 ns | 29.4 | 792 B | 168 B | 48.5 |
| Complex | 1.37 μs | 95.94 ns | 26.6 | 1.66 KB | 360 B | 47.1 |
| Property | 739.16 ns | 73.67 ns | 31.8 | 1.08 KB | 336 B | 56.5 |
| Generics | 2.06 μs | 32.13 ns | 12.7 | 1008 B | 144 B | 40.3 |
| IEnumerable | — | 48.05 ns | 0 | — | 72 B | 0 |
| Array | 2.21 μs | 137.09 ns | 25 | 9.59 KB | 624 B | 25.7 |
| Conditional | 402.26 ns | 35.89 ns | 30.2 | 624 B | 144 B | 50.9 |
| Child Container | 7.68 μs | 717.55 ns | 30.6 | 8.81 KB | 1.59 KB | 42.7 |
| Interception With Proxy | — | 75.07 ns | 0 | — | 248 B | 0 |
| Prepare And Register | 7.88 μs | 7.31 ns | 3.249 | 19.28 KB | 64 B | 6.672 |
| Prepare And Register And Simple Resolve | 12.54 μs | 6.37 ns | 2.424 | 21.89 KB | 24 B | 4.625 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Singleton | 203.42 ns | 1.49 ns | 11 | 720 B | 0 B | 18 |
| Transient | 216.7 ns | 18.06 ns | 29.6 | 648 B | 72 B | 37.8 |
| PerResolve | — | 14.26 ns | 0 | — | 56 B | 0 |
| Scoped | 793.3 ns | 48.01 ns | 24.8 | 1.63 KB | 160 B | 32.9 |
| Combined | 433.98 ns | 44.51 ns | 32.3 | 1.24 KB | 168 B | 38.5 |
| Complex | 972.09 ns | 95.94 ns | 31.6 | 2.79 KB | 360 B | 36.5 |
| Property | 814.31 ns | 73.67 ns | 30.3 | 1.8 KB | 336 B | 43.9 |
| Generics | 285.22 ns | 32.13 ns | 34 | 912 B | 144 B | 42.4 |
| IEnumerable | — | 48.05 ns | 0 | — | 72 B | 0 |
| Array | — | 137.09 ns | 0 | — | 624 B | 0 |
| Conditional | 382.29 ns | 35.89 ns | 31 | 1.01 KB | 144 B | 39.9 |
| Child Container | — | 717.55 ns | 0 | — | 1.59 KB | 0 |
| Interception With Proxy | 642.29 ns | 75.07 ns | 34.4 | 1.03 KB | 248 B | 50.2 |
| Prepare And Register | 20.19 μs | 7.31 ns | 2.029 | 27.62 KB | 64 B | 5.576 |
| Prepare And Register And Simple Resolve | 20.6 μs | 6.37 ns | 1.891 | 28.62 KB | 24 B | 4.046 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Singleton | 677.86 ns | 1.49 ns | 6.058 | 2.58 KB | 0 B | 9.492 |
| Transient | 436.51 ns | 18.06 ns | 20.9 | 1.17 KB | 72 B | 28 |
| PerResolve | — | 14.26 ns | 0 | — | 56 B | 0 |
| Scoped | 6.42 μs | 48.01 ns | 8.737 | 9.67 KB | 160 B | 13.6 |
| Combined | 1.31 μs | 44.51 ns | 18.6 | 2.86 KB | 168 B | 25.5 |
| Complex | 3.44 μs | 95.94 ns | 16.8 | 4.64 KB | 360 B | 28.4 |
| Property | 1.28 μs | 73.67 ns | 24.1 | 1.64 KB | 336 B | 46 |
| Generics | 1.28 μs | 32.13 ns | 16.1 | 2.63 KB | 144 B | 24.9 |
| IEnumerable | — | 48.05 ns | 0 | — | 72 B | 0 |
| Array | 3.29 μs | 137.09 ns | 20.5 | 4.99 KB | 624 B | 35.5 |
| Conditional | 798.43 ns | 35.89 ns | 21.5 | 1.38 KB | 144 B | 34.2 |
| Child Container | 1.03 ms | 717.55 ns | 2.639 | 60.01 KB | 1.59 KB | 16.4 |
| Interception With Proxy | 206.47 ns | 75.07 ns | 60.6 | 624 B | 248 B | 64.8 |
| Prepare And Register | 76.52 μs | 7.31 ns | 1.042 | 60.82 KB | 64 B | 3.758 |
| Prepare And Register And Simple Resolve | 1.06 ms | 6.37 ns | 0.263 | 100.31 KB | 24 B | 2.161 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Singleton | 124.82 ns | 1.49 ns | 14.1 | 168 B | 0 B | 35.4 |
| Transient | 197.58 ns | 18.06 ns | 31 | 240 B | 72 B | 60.3 |
| PerResolve | — | 14.26 ns | 0 | — | 56 B | 0 |
| Scoped | — | 48.01 ns | 0 | — | 160 B | 0 |
| Combined | 347.78 ns | 44.51 ns | 36.1 | 504 B | 168 B | 60.3 |
| Complex | 742.13 ns | 95.94 ns | 36.1 | 1.17 KB | 360 B | 56 |
| Property | — | 73.67 ns | 0 | — | 336 B | 0 |
| Generics | — | 32.13 ns | 0 | — | 144 B | 0 |
| IEnumerable | — | 48.05 ns | 0 | — | 72 B | 0 |
| Array | — | 137.09 ns | 0 | — | 624 B | 0 |
| Conditional | 435.73 ns | 35.89 ns | 29.1 | 480 B | 144 B | 57.7 |
| Child Container | — | 717.55 ns | 0 | — | 1.59 KB | 0 |
| Interception With Proxy | — | 75.07 ns | 0 | — | 248 B | 0 |
| Prepare And Register | 3.79 μs | 7.31 ns | 4.681 | 4.48 KB | 64 B | 13.8 |
| Prepare And Register And Simple Resolve | 41.94 μs | 6.37 ns | 1.325 | 8.94 KB | 24 B | 7.233 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Singleton | 339.78 ns | 1.49 ns | 8.551 | 1.92 KB | 0 B | 11 |
| Transient | 758.36 ns | 18.06 ns | 15.8 | 2.44 KB | 72 B | 19.5 |
| PerResolve | — | 14.26 ns | 0 | — | 56 B | 0 |
| Scoped | 1.56 μs | 48.01 ns | 17.7 | 4.5 KB | 160 B | 19.9 |
| Combined | 2.02 μs | 44.51 ns | 15 | 4.48 KB | 168 B | 20.4 |
| Complex | 4.75 μs | 95.94 ns | 14.3 | 9.05 KB | 360 B | 20.3 |
| Property | 13.44 μs | 73.67 ns | 7.453 | 20.91 KB | 336 B | 13 |
| Generics | 1.74 μs | 32.13 ns | 13.8 | 3.91 KB | 144 B | 20.4 |
| IEnumerable | — | 48.05 ns | 0 | — | 72 B | 0 |
| Array | 6.49 μs | 137.09 ns | 14.6 | 8.6 KB | 624 B | 27.1 |
| Conditional | 1.51 μs | 35.89 ns | 15.6 | 3.16 KB | 144 B | 22.7 |
| Child Container | 10.41 μs | 717.55 ns | 26.3 | 16.03 KB | 1.59 KB | 31.7 |
| Interception With Proxy | 2.36 μs | 75.07 ns | 17.9 | 2.58 KB | 248 B | 32 |
| Prepare And Register | 53.38 μs | 7.31 ns | 1.248 | 48.76 KB | 64 B | 4.197 |
| Prepare And Register And Simple Resolve | 55.48 μs | 6.37 ns | 1.152 | 50.46 KB | 24 B | 3.047 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Singleton | 986.18 ns | 1.49 ns | 5.024 | 336 B | 0 B | 25.8 |
| Transient | 1.57 μs | 18.06 ns | 11 | 480 B | 72 B | 43.6 |
| PerResolve | — | 14.26 ns | 0 | — | 56 B | 0 |
| Scoped | — | 48.01 ns | 0 | — | 160 B | 0 |
| Combined | 5.08 μs | 44.51 ns | 9.46 | 3.02 KB | 168 B | 24.8 |
| Complex | 12.1 μs | 95.94 ns | 8.949 | 10.1 KB | 360 B | 19.2 |
| Property | 58.11 μs | 73.67 ns | 3.585 | 361.37 KB | 336 B | 3.119 |
| Generics | — | 32.13 ns | 0 | — | 144 B | 0 |
| IEnumerable | — | 48.05 ns | 0 | — | 72 B | 0 |
| Array | 14.1 μs | 137.09 ns | 9.894 | 7.08 KB | 624 B | 29.9 |
| Conditional | 4.11 μs | 35.89 ns | 9.471 | 2.58 KB | 144 B | 25.1 |
| Child Container | — | 717.55 ns | 0 | — | 1.59 KB | 0 |
| Interception With Proxy | 200.71 ns | 75.07 ns | 61.4 | 328 B | 248 B | 87.9 |
| Prepare And Register | 5.09 μs | 7.31 ns | 4.043 | 16.2 KB | 64 B | 7.277 |
| Prepare And Register And Simple Resolve | 14.68 μs | 6.37 ns | 2.24 | 39.66 KB | 24 B | 3.437 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Singleton | 256.15 ns | 1.49 ns | 9.844 | 984 B | 0 B | 15.4 |
| Transient | 992.05 ns | 18.06 ns | 13.9 | 2.34 KB | 72 B | 19.9 |
| PerResolve | 1.73 μs | 14.26 ns | 9.397 | 3.03 KB | 56 B | 16 |
| Scoped | 4.55 μs | 48.01 ns | 10.4 | 3.79 KB | 160 B | 21.7 |
| Combined | 3.35 μs | 44.51 ns | 11.7 | 5.34 KB | 168 B | 18.7 |
| Complex | 8.69 μs | 95.94 ns | 10.6 | 12.42 KB | 360 B | 17.4 |
| Property | 6.13 μs | 73.67 ns | 11 | 9.09 KB | 336 B | 19.6 |
| Generics | 6.56 μs | 32.13 ns | 7.106 | 5.84 KB | 144 B | 16.7 |
| IEnumerable | — | 48.05 ns | 0 | — | 72 B | 0 |
| Array | 8.13 μs | 137.09 ns | 13 | 12.94 KB | 624 B | 22.1 |
| Conditional | 2.67 μs | 35.89 ns | 11.8 | 4.8 KB | 144 B | 18.4 |
| Child Container | — | 717.55 ns | 0 | — | 1.59 KB | 0 |
| Interception With Proxy | 1.61 μs | 75.07 ns | 21.8 | 2.36 KB | 248 B | 33.4 |
| Prepare And Register | 138.91 μs | 7.31 ns | 0.774 | 75.78 KB | 64 B | 3.367 |
| Prepare And Register And Simple Resolve | 132 μs | 6.37 ns | 0.747 | 77.27 KB | 24 B | 2.463 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Singleton | 152.48 ns | 1.49 ns | 12.7 | 0 B | 0 B | 100 |
| Transient | 344.05 ns | 18.06 ns | 23.5 | 360 B | 72 B | 50 |
| PerResolve | — | 14.26 ns | 0 | — | 56 B | 0 |
| Scoped | — | 48.01 ns | 0 | — | 160 B | 0 |
| Combined | 1.19 μs | 44.51 ns | 19.5 | 1.24 KB | 168 B | 38.5 |
| Complex | 3.19 μs | 95.94 ns | 17.4 | 3.47 KB | 360 B | 32.8 |
| Property | — | 73.67 ns | 0 | — | 336 B | 0 |
| Generics | — | 32.13 ns | 0 | — | 144 B | 0 |
| IEnumerable | — | 48.05 ns | 0 | — | 72 B | 0 |
| Array | — | 137.09 ns | 0 | — | 624 B | 0 |
| Conditional | — | 35.89 ns | 0 | — | 144 B | 0 |
| Child Container | — | 717.55 ns | 0 | — | 1.59 KB | 0 |
| Interception With Proxy | — | 75.07 ns | 0 | — | 248 B | 0 |
| Prepare And Register | 808.98 ns | 7.31 ns | 10.1 | 2.35 KB | 64 B | 19 |
| Prepare And Register And Simple Resolve | 993.96 ns | 6.37 ns | 8.605 | 2.6 KB | 24 B | 13.4 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Singleton | 1.76 μs | 1.49 ns | 3.766 | 2.23 KB | 0 B | 10.2 |
| Transient | 6.43 μs | 18.06 ns | 5.444 | 4.99 KB | 72 B | 13.7 |
| PerResolve | — | 14.26 ns | 0 | — | 56 B | 0 |
| Scoped | 1.04 ms | 48.01 ns | 0.688 | 1.97 MB | 160 B | 0.943 |
| Combined | 16.32 μs | 44.51 ns | 5.281 | 13.17 KB | 168 B | 11.9 |
| Complex | 40.87 μs | 95.94 ns | 4.87 | 42.68 KB | 360 B | 9.371 |
| Property | 26.73 μs | 73.67 ns | 5.285 | 20.11 KB | 336 B | 13.2 |
| Generics | 18.02 μs | 32.13 ns | 4.287 | 10.83 KB | 144 B | 12.3 |
| IEnumerable | — | 48.05 ns | 0 | — | 72 B | 0 |
| Array | 45.49 μs | 137.09 ns | 5.509 | 27.47 KB | 624 B | 15.2 |
| Conditional | 12.8 μs | 35.89 ns | 5.368 | 10.27 KB | 144 B | 12.6 |
| Child Container | — | 717.55 ns | 0 | — | 1.59 KB | 0 |
| Interception With Proxy | 3.93 μs | 75.07 ns | 13.9 | 3.44 KB | 248 B | 27.7 |
| Prepare And Register | 265.35 μs | 7.31 ns | 0.56 | 33.73 KB | 64 B | 5.046 |
| Prepare And Register And Simple Resolve | 549.28 μs | 6.37 ns | 0.366 | 46.89 KB | 24 B | 3.161 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Singleton | 204.53 ns | 1.49 ns | 11 | 336 B | 0 B | 25.8 |
| Transient | 3.29 μs | 18.06 ns | 7.615 | 5.62 KB | 72 B | 12.9 |
| PerResolve | — | 14.26 ns | 0 | — | 56 B | 0 |
| Scoped | — | 48.01 ns | 0 | — | 160 B | 0 |
| Combined | 7.61 μs | 44.51 ns | 7.73 | 12.22 KB | 168 B | 12.4 |
| Complex | 16.38 μs | 95.94 ns | 7.693 | 26.05 KB | 360 B | 12 |
| Property | — | 73.67 ns | 0 | — | 336 B | 0 |
| Generics | — | 32.13 ns | 0 | — | 144 B | 0 |
| IEnumerable | — | 48.05 ns | 0 | — | 72 B | 0 |
| Array | — | 137.09 ns | 0 | — | 624 B | 0 |
| Conditional | 4.5 μs | 35.89 ns | 9.056 | 6.98 KB | 144 B | 15.3 |
| Child Container | 2 ms | 717.55 ns | 1.895 | 2.28 MB | 1.59 KB | 2.628 |
| Interception With Proxy | — | 75.07 ns | 0 | — | 248 B | 0 |
| Prepare And Register | 2.82 μs | 7.31 ns | 5.426 | 6.8 KB | 64 B | 11.2 |
| Prepare And Register And Simple Resolve | 963.41 μs | 6.37 ns | 0.277 | 1.14 MB | 24 B | 0.634 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Singleton | 4.34 μs | 1.49 ns | 2.397 | 5.79 KB | 0 B | 6.35 |
| Transient | 7.86 μs | 18.06 ns | 4.925 | 7.85 KB | 72 B | 10.9 |
| PerResolve | — | 14.26 ns | 0 | — | 56 B | 0 |
| Scoped | — | 48.01 ns | 0 | — | 160 B | 0 |
| Combined | 11.82 μs | 44.51 ns | 6.205 | 9.84 KB | 168 B | 13.8 |
| Complex | 21.48 μs | 95.94 ns | 6.718 | 13.92 KB | 360 B | 16.4 |
| Property | 18.6 μs | 73.67 ns | 6.336 | 12.09 KB | 336 B | 17 |
| Generics | — | 32.13 ns | 0 | — | 144 B | 0 |
| IEnumerable | — | 48.05 ns | 0 | — | 72 B | 0 |
| Array | 26.71 μs | 137.09 ns | 7.191 | 17.48 KB | 624 B | 19 |
| Conditional | 11.68 μs | 35.89 ns | 5.618 | 9.8 KB | 144 B | 12.9 |
| Child Container | — | 717.55 ns | 0 | — | 1.59 KB | 0 |
| Interception With Proxy | — | 75.07 ns | 0 | — | 248 B | 0 |
| Prepare And Register | 533.1 μs | 7.31 ns | 0.395 | 181.05 KB | 64 B | 2.179 |
| Prepare And Register And Simple Resolve | 607.52 μs | 6.37 ns | 0.348 | 181.7 KB | 24 B | 1.606 |
Basic
Compared libraries (23)
| Autofac 9.3.2 A flexible inversion of control container for building extensible .NET applications. |
Compare → | |
| Castle Windsor 6.0.0 The Castle Project container, with bound lifestyles and Castle DynamicProxy interception. |
Compare → | |
| Catel 6.2.0 An MVVM application framework whose service locator and type factory perform constructor injection. |
Compare → | |
| DryIoc 5.4.3 A fast, small and feature-rich container with expression-compiled resolution and rich reuse options. |
Compare → | |
| Faster.Ioc 5.0.0 A minimalistic container focused on the shortest possible resolve path. |
Compare → | |
| Grace 7.2.1 A container with a fluent registration model, per-object-graph lifestyles and decorator support. |
Compare → | |
| Hand-coded Direct dependency injection written in C# without a container. |
Compare → | |
| Lamar 16.0.0 The successor to StructureMap, built around runtime code generation. |
Compare → | |
| LightInject 7.1.0 A lightweight container with an ultra-small API surface and its own interception package. |
Compare → | |
| Maestro 3.6.6 A small container with a fluent configuration API and pluggable activation interceptors. |
Compare → | |
| Managed Extensibility Framework 2 10.0.10 The lightweight Managed Extensibility Framework composition engine shipped as System.Composition. |
Compare → | |
| Microsoft Extensions Dependency Injection 10.0.10 The built-in .NET dependency injection container and its service collection abstractions. |
Compare → | |
| MvvmCross 10.1.2 A cross-platform MVVM framework with its own inversion of control provider. |
Compare → | |
| Ninject 3.3.6 A container built around fluent bindings, contextual conditions and pluggable extensions. |
Compare → | |
| Pure.DI 2.5.2 A compile-time dependency injection framework that generates strongly typed compositions. |
Compare → | |
| Simple Injector 5.6.0 A fast, opinionated dependency injection library that promotes explicit configuration and maintainable application design. |
Compare → | |
| Singularity 0.18.0 An expression-tree based container that validates the whole object graph when the container is built. |
Compare → | |
| Spring.NET 3.0.3 The Spring.NET application framework and its XML or code configured object factory. |
Compare → | |
| Stashbox 5.20.0 A fast container with per-request lifetimes, conditional registrations and child containers. |
Compare → | |
| StructureMap 4.7.1 A mature container with a fluent registry DSL, nested containers and decorators. |
Compare → | |
| Unity 5.11.10 The Unity container, offering per-resolve lifetimes and hierarchical child containers. |
Compare → | |
| Visual Studio MEF 17.13.41 The Visual Studio composition engine, a fast attribute-driven MEF implementation. |
Compare → | |
| ZenIoc 1.0.1 A tiny container with compiled registrations, named resolution and nested containers. |
Compare → |
Benchmark scenarios (15)
Registers three singleton services and resolves each of them repeatedly. Every resolve of the same service must return the same instance.
Registers three transient services and resolves each of them repeatedly. Every resolve must create a new instance, never reusing an earlier one.
Resolves an object graph that asks for the same dependency twice. Both requests inside one resolution share an instance, while the next resolution gets a new one.
Resolves scoped services inside explicit scopes. One instance per scope, different instances across scopes, and scope-owned disposables are disposed when the scope ends.
Resolves three roots that mix singleton and transient dependencies. The singleton is shared across every root while each transient dependency is distinct.
Registers and resolves three multi-level object graphs, checking that every nested dependency has the expected implementation type and lifetime.
Resolves three roots that carry writable service properties. The container, or its intended property-injection extension, must assign them during activation.
Registers one open generic service mapping and resolves roots closed over int, float and object. Registering every closed type separately does not count.
Injects a sequence of five plugin implementations and requires it to be genuinely lazy: nothing is created until enumeration, and every enumeration yields new transients.
Resolves three roots that materialise their injected sequence of five plugins into an array while the root is being activated.
Gives each of three consumers a different implementation of one contract, chosen through the metadata, key, predicate or consumer-context mechanism of the library.
Creates a real nested child container that inherits the registrations of its parent and can add or override them without changing the parent.
Resolves a service through the interception or activation extension point of the library. The result must be a proxy whose interceptor proceeds to the real target.
Measures creating the container and registering the whole prescribed graph, without resolving anything from it.
Measures the same setup as Prepare And Register, followed by a single resolve of one singleton root.
System.Text.Json leads the current rating · 3 libraries · 14 scenarios
In every scenario the fastest library scores 100 points and the one allocating least scores 100 more; four times slower is half the points, and an unsupported scenario is worth nothing. Time and memory reach 1400 each here, so the maximum is 2800. See workflows/rating.md.
| # | Library | Scenarios | Time | Memory | Points | Group wins |
|---|---|---|---|---|---|---|
| 1 | System.Text.Json | 14/14 | 1275 | 1249 | 2524 | gold in Advanced, gold in Basic, gold in Collections, gold in Nested, gold in Stream, silver in Prepare |
| 2 | ServiceStack.Text | 12/14 | 1091 | 887 | 1978 | gold in Prepare, silver in Advanced, silver in Basic, silver in Collections, silver in Nested, silver in Stream |
| 3 | Newtonsoft.Json | 13/14 | 817 | 398 | 1215 | bronze in Advanced, bronze in Basic, bronze in Collections, bronze in Nested, bronze in Prepare, bronze in Stream |
How the points were earned — every scenario, with the measurements behind it
Each row is one scenario. Best is the lowest result among the rated libraries
that completed it, and the points follow from the two figures beside them:
100 × √((best + step) / (result + step)), with a step of 1 ns for time and 24 B
for memory. A dash means the library did not complete the scenario, and it scores
nothing for it. Add the two Points columns over every scenario and you get the
rating above. The same breakdown appears as a hint on any points value in the
application.
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Serialize Simple Object | 124.45 ns | 124.45 ns | 100 | 96 B | 96 B | 100 |
| Deserialize Simple Object | 166.1 ns | 130.14 ns | 88.6 | 64 B | 64 B | 100 |
| Serialize Nested Object | 272.58 ns | 272.58 ns | 100 | 504 B | 504 B | 100 |
| Deserialize Nested Object | 431.47 ns | 397.68 ns | 96 | 768 B | 320 B | 65.9 |
| Serialize Collection | 370.54 ns | 370.54 ns | 100 | 560 B | 560 B | 100 |
| Deserialize Collection | 656.91 ns | 656.91 ns | 100 | 800 B | 472 B | 77.6 |
| Serialize Dictionary | 123.24 ns | 123.24 ns | 100 | 88 B | 88 B | 100 |
| Deserialize Dictionary | 212.4 ns | 175.94 ns | 91.1 | 312 B | 312 B | 100 |
| Enum Round Trip | 235.91 ns | 234.95 ns | 99.8 | 88 B | 88 B | 100 |
| Custom Converter Round Trip | 234.72 ns | 229.05 ns | 98.8 | 120 B | 120 B | 100 |
| Polymorphic Round Trip | 1.28 μs | 1.28 μs | 100 | 1.32 KB | 1.32 KB | 100 |
| UTF-8 Stream Round Trip | 405.83 ns | 405.83 ns | 100 | 280 B | 280 B | 100 |
| Source Generation Round Trip | 296.87 ns | 296.87 ns | 100 | 160 B | 160 B | 100 |
| Prepare Serializer | 13.54 μs | 0 ns | 0.86 | 7.45 KB | 0 B | 5.599 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Serialize Simple Object | 211.04 ns | 124.45 ns | 76.9 | 336 B | 96 B | 57.7 |
| Deserialize Simple Object | 130.14 ns | 130.14 ns | 100 | 112 B | 64 B | 80.4 |
| Serialize Nested Object | 446.18 ns | 272.58 ns | 78.2 | 792 B | 504 B | 80.4 |
| Deserialize Nested Object | 397.68 ns | 397.68 ns | 100 | 320 B | 320 B | 100 |
| Serialize Collection | 663.32 ns | 370.54 ns | 74.8 | 1000 B | 560 B | 75.5 |
| Deserialize Collection | 693.63 ns | 656.91 ns | 97.3 | 472 B | 472 B | 100 |
| Serialize Dictionary | 154.92 ns | 123.24 ns | 89.3 | 288 B | 88 B | 59.9 |
| Deserialize Dictionary | 175.94 ns | 175.94 ns | 100 | 424 B | 312 B | 86.6 |
| Enum Round Trip | 234.95 ns | 234.95 ns | 100 | 336 B | 88 B | 55.8 |
| Custom Converter Round Trip | 229.05 ns | 229.05 ns | 100 | 400 B | 120 B | 58.3 |
| Polymorphic Round Trip | — | 1.28 μs | 0 | — | 1.32 KB | 0 |
| UTF-8 Stream Round Trip | 736.08 ns | 405.83 ns | 74.3 | 2.8 KB | 280 B | 32.4 |
| Source Generation Round Trip | — | 296.87 ns | 0 | — | 160 B | 0 |
| Prepare Serializer | 0 ns | 0 ns | 100 | 0 B | 0 B | 100 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Serialize Simple Object | 261.98 ns | 124.45 ns | 69.1 | 1.41 KB | 96 B | 28.6 |
| Deserialize Simple Object | 421.68 ns | 130.14 ns | 55.7 | 2.61 KB | 64 B | 18.1 |
| Serialize Nested Object | 434.9 ns | 272.58 ns | 79.2 | 1.63 KB | 504 B | 55.9 |
| Deserialize Nested Object | 746.87 ns | 397.68 ns | 73 | 2.89 KB | 320 B | 34 |
| Serialize Collection | 626.98 ns | 370.54 ns | 76.9 | 1.83 KB | 560 B | 55.5 |
| Deserialize Collection | 1.15 μs | 656.91 ns | 75.5 | 2.99 KB | 472 B | 40.1 |
| Serialize Dictionary | 261.29 ns | 123.24 ns | 68.8 | 1.48 KB | 88 B | 27 |
| Deserialize Dictionary | 446.62 ns | 175.94 ns | 62.9 | 2.83 KB | 312 B | 33.9 |
| Enum Round Trip | 713.77 ns | 234.95 ns | 57.5 | 4.68 KB | 88 B | 15.2 |
| Custom Converter Round Trip | 665.09 ns | 229.05 ns | 58.8 | 4.68 KB | 120 B | 17.3 |
| Polymorphic Round Trip | 2.58 μs | 1.28 μs | 70.5 | 7.79 KB | 1.32 KB | 41.5 |
| UTF-8 Stream Round Trip | 869.59 ns | 405.83 ns | 68.4 | 4.13 KB | 280 B | 26.8 |
| Source Generation Round Trip | — | 296.87 ns | 0 | — | 160 B | 0 |
| Prepare Serializer | 29.1 μs | 0 ns | 0.586 | 11.63 KB | 0 B | 4.485 |
Basic
Compared libraries (3)
| Newtonsoft.Json 13.0.4 A mature JSON framework for .NET with configurable contracts, converters, and streaming readers and writers. |
Compare → | |
| ServiceStack.Text 10.0.8 A high-performance text library with typed JSON, stream, collection, and type-specific serialization APIs. |
Compare → | |
| System.Text.Json The reflection-based and source-generated JSON serializer included with .NET. |
Compare → |
Benchmark scenarios (14)
Serializes one scalar object to a compact JSON string.
Deserializes one compact JSON object and validates every scalar member.
Serializes an order, customer, and address object graph.
Deserializes and materializes an order, customer, and address object graph.
Serializes three ordered objects to a compact JSON array.
Deserializes a compact JSON array to three ordered objects.
Serializes three ordered string and integer entries to a JSON object.
Deserializes a JSON object to three ordinal string and integer entries.
Serializes an enum as its string name and deserializes it back.
Serializes a strongly typed identifier as a JSON string and deserializes it back.
Round-trips a base-type collection through safe cat and dog discriminators.
Serializes a simple object to a new UTF-8 memory stream and deserializes it back.
Round-trips a simple object with compile-time generated JSON metadata.
Creates fresh serializer settings and explicit type metadata without serializing data.
Microsoft.Extensions.Logging leads the current rating · 6 libraries · 8 scenarios
In every scenario the fastest library scores 100 points and the one allocating least scores 100 more; four times slower is half the points, and an unsupported scenario is worth nothing. Time and memory reach 800 each here, so the maximum is 1600. See workflows/rating.md.
| # | Library | Scenarios | Time | Memory | Points | Group wins |
|---|---|---|---|---|---|---|
| 1 | Microsoft.Extensions.Logging | 7/8 | 556 | 638 | 1194 | gold in Structured |
| 2 | NLog | 8/8 | 582 | 426 | 1008 | gold in Core, silver in Structured, bronze in Prepare |
| 3 | Serilog | 8/8 | 460 | 430 | 891 | gold in Prepare, bronze in Core, bronze in Structured |
| 4 | log4net | 8/8 | 253 | 348 | 601 | silver in Prepare |
| 5 | ZLogger | 3/8 | 166 | 238 | 404 | silver in Core |
How the points were earned — every scenario, with the measurements behind it
Each row is one scenario. Best is the lowest result among the rated libraries
that completed it, and the points follow from the two figures beside them:
100 × √((best + step) / (result + step)), with a step of 1 ns for time and 24 B
for memory. A dash means the library did not complete the scenario, and it scores
nothing for it. Add the two Points columns over every scenario and you get the
rating above. The same breakdown appears as a hint on any points value in the
application.
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Disabled Log | 6.04 ns | 0.03 ns | 38.3 | 0 B | 0 B | 100 |
| Simple Message | 15.4 ns | 15.4 ns | 100 | 0 B | 0 B | 100 |
| Structured Properties | 38.37 ns | 38.37 ns | 100 | 88 B | 88 B | 100 |
| Exception | 15.19 ns | 15.19 ns | 100 | 0 B | 0 B | 100 |
| Scope Or Context | 63.9 ns | 63.9 ns | 100 | 120 B | 120 B | 100 |
| Template Rendering | 30.97 ns | 30.97 ns | 100 | 0 B | 0 B | 100 |
| Buffered Logging | — | 81.32 ns | 0 | — | 0 B | 0 |
| Create Logger | 25.84 μs | 799.84 ns | 17.6 | 21.18 KB | 3.07 KB | 38.2 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Disabled Log | 0.03 ns | 0.03 ns | 100 | 0 B | 0 B | 100 |
| Simple Message | 44.25 ns | 15.4 ns | 60.2 | 120 B | 0 B | 40.8 |
| Structured Properties | 77.49 ns | 38.37 ns | 70.8 | 248 B | 88 B | 64.2 |
| Exception | 42.95 ns | 15.19 ns | 60.7 | 120 B | 0 B | 40.8 |
| Scope Or Context | 91.41 ns | 63.9 ns | 83.8 | 248 B | 120 B | 72.8 |
| Template Rendering | 82.86 ns | 30.97 ns | 61.7 | 232 B | 0 B | 30.6 |
| Buffered Logging | 81.32 ns | 81.32 ns | 100 | 120 B | 0 B | 40.8 |
| Create Logger | 4 μs | 799.84 ns | 44.7 | 24.45 KB | 3.07 KB | 35.6 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Disabled Log | 0.36 ns | 0.03 ns | 86.9 | 0 B | 0 B | 100 |
| Simple Message | 80.39 ns | 15.4 ns | 44.9 | 160 B | 0 B | 36.1 |
| Structured Properties | 172.83 ns | 38.37 ns | 47.6 | 448 B | 88 B | 48.7 |
| Exception | 81.07 ns | 15.19 ns | 44.4 | 160 B | 0 B | 36.1 |
| Scope Or Context | 181.63 ns | 63.9 ns | 59.6 | 544 B | 120 B | 50.4 |
| Template Rendering | 181.07 ns | 30.97 ns | 41.9 | 432 B | 0 B | 22.9 |
| Buffered Logging | 670.15 ns | 81.32 ns | 35 | 160 B | 0 B | 36.1 |
| Create Logger | 799.84 ns | 799.84 ns | 100 | 3.07 KB | 3.07 KB | 100 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Disabled Log | 6.66 ns | 0.03 ns | 36.7 | 0 B | 0 B | 100 |
| Simple Message | 226.51 ns | 15.4 ns | 26.8 | 168 B | 0 B | 35.4 |
| Structured Properties | 728.39 ns | 38.37 ns | 23.2 | 1.77 KB | 88 B | 24.7 |
| Exception | 232.15 ns | 15.19 ns | 26.3 | 168 B | 0 B | 35.4 |
| Scope Or Context | 429.04 ns | 63.9 ns | 38.8 | 848 B | 120 B | 40.6 |
| Template Rendering | 260.54 ns | 30.97 ns | 35 | 280 B | 0 B | 28.1 |
| Buffered Logging | 505.36 ns | 81.32 ns | 40.3 | 848 B | 0 B | 16.6 |
| Create Logger | 12.09 μs | 799.84 ns | 25.7 | 6.79 KB | 3.07 KB | 67.4 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Disabled Log | 1.58 ns | 0.03 ns | 63.2 | 0 B | 0 B | 100 |
| Simple Message | — | 15.4 ns | 0 | — | 0 B | 0 |
| Structured Properties | — | 38.37 ns | 0 | — | 88 B | 0 |
| Exception | — | 15.19 ns | 0 | — | 0 B | 0 |
| Scope Or Context | — | 63.9 ns | 0 | — | 120 B | 0 |
| Template Rendering | — | 30.97 ns | 0 | — | 0 B | 0 |
| Buffered Logging | 115.59 ns | 81.32 ns | 84 | 0 B | 0 B | 100 |
| Create Logger | 23.26 μs | 799.84 ns | 18.6 | 21.19 KB | 3.07 KB | 38.2 |
Core
Compared libraries (6)
| log4net 3.3.2 A mature Apache logging framework with hierarchical repositories, contextual properties, layouts, and appenders. |
Compare → | |
| Microsoft.Extensions.Logging 10.0.10 The standard .NET logging abstraction and logger factory with providers, filtering, structured state, and scopes. |
Compare → | |
| NLog 6.1.4 A configurable logging platform with structured events, scope context, targets, layouts, and asynchronous wrappers. |
Compare → | |
| OpenTelemetry 1.17.0 The OpenTelemetry .NET logging provider and processing pipeline for collecting, enriching, batching, and exporting MEL log records. |
Compare → | |
| Serilog 4.4.0 A structured event logger with message templates, contextual enrichment, and a broad sink ecosystem. |
Compare → | |
| ZLogger 2.5.10 A source-generated and interpolated-string logger built on Microsoft.Extensions.Logging with UTF-8 and processor APIs. |
Compare → |
Benchmark scenarios (8)
Submits an Information event to a logger whose minimum level is Warning.
Delivers one literal Information message to an in-memory sink.
Delivers one event with independently queryable OrderId and ElapsedMs properties.
Delivers one Error event retaining the original exception metadata.
Creates a temporary RequestId context and captures it on one event.
Formats amount 12.5 and customer Ada through the logger template API.
Enqueues one event to a library-provided async or buffering wrapper and validates delivery after flush.
Creates, verifies, and releases one Information-enabled logger with an in-memory sink.
Mapperly leads the current rating · 4 libraries · 10 scenarios
In every scenario the fastest library scores 100 points and the one allocating least scores 100 more; four times slower is half the points, and an unsupported scenario is worth nothing. Time and memory reach 1000 each here, so the maximum is 2000. See workflows/rating.md.
| # | Library | Scenarios | Time | Memory | Points | Group wins |
|---|---|---|---|---|---|---|
| 1 | Mapperly | 10/10 | 1000 | 1000 | 2000 | gold in Advanced, gold in Basic, gold in Prepare |
| 2 | Mapster | 10/10 | 587 | 792 | 1379 | silver in Advanced, silver in Basic, bronze in Prepare |
| 3 | AutoMapper | 10/10 | 416 | 802 | 1218 | silver in Prepare, bronze in Advanced, bronze in Basic |
How the points were earned — every scenario, with the measurements behind it
Each row is one scenario. Best is the lowest result among the rated libraries
that completed it, and the points follow from the two figures beside them:
100 × √((best + step) / (result + step)), with a step of 1 ns for time and 24 B
for memory. A dash means the library did not complete the scenario, and it scores
nothing for it. Add the two Points columns over every scenario and you get the
rating above. The same breakdown appears as a hint on any points value in the
application.
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Simple Object | 9.34 ns | 9.34 ns | 100 | 56 B | 56 B | 100 |
| Nested Object | 48.39 ns | 48.39 ns | 100 | 248 B | 248 B | 100 |
| Collection | 1.1 μs | 1.1 μs | 100 | 6.27 KB | 6.27 KB | 100 |
| Flattening | 11.79 ns | 11.79 ns | 100 | 56 B | 56 B | 100 |
| Map To Existing | 3.41 ns | 3.41 ns | 100 | 0 B | 0 B | 100 |
| Null Handling | 10.46 ns | 10.46 ns | 100 | 40 B | 40 B | 100 |
| Custom Conversion | 76.23 ns | 76.23 ns | 100 | 88 B | 88 B | 100 |
| Polymorphic Mapping | 36.18 ns | 36.18 ns | 100 | 144 B | 144 B | 100 |
| Prepare Configuration | 0 ns | 0 ns | 100 | 0 B | 0 B | 100 |
| Prepare And Simple Map | 9.89 ns | 9.89 ns | 100 | 56 B | 56 B | 100 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Simple Object | 18.71 ns | 9.34 ns | 72.4 | 56 B | 56 B | 100 |
| Nested Object | 65.33 ns | 48.39 ns | 86.3 | 248 B | 248 B | 100 |
| Collection | 1.29 μs | 1.1 μs | 92.6 | 6.27 KB | 6.27 KB | 100 |
| Flattening | 19.69 ns | 11.79 ns | 78.6 | 56 B | 56 B | 100 |
| Map To Existing | 15.26 ns | 3.41 ns | 52.1 | 0 B | 0 B | 100 |
| Null Handling | 29.22 ns | 10.46 ns | 61.6 | 40 B | 40 B | 100 |
| Custom Conversion | 92.48 ns | 76.23 ns | 90.9 | 112 B | 88 B | 90.7 |
| Polymorphic Mapping | 133.4 ns | 36.18 ns | 52.6 | 144 B | 144 B | 100 |
| Prepare Configuration | 24.28 ms | 0 ns | 0.02 | 2.6 MB | 0 B | 0.297 |
| Prepare And Simple Map | 25.25 ms | 9.89 ns | 0.066 | 2.75 MB | 56 B | 0.527 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Simple Object | 75.53 ns | 9.34 ns | 36.8 | 56 B | 56 B | 100 |
| Nested Object | 103.32 ns | 48.39 ns | 68.8 | 248 B | 248 B | 100 |
| Collection | 1.35 μs | 1.1 μs | 90.2 | 6.27 KB | 6.27 KB | 100 |
| Flattening | 68.55 ns | 11.79 ns | 42.9 | 56 B | 56 B | 100 |
| Map To Existing | 67.26 ns | 3.41 ns | 25.4 | 0 B | 0 B | 100 |
| Null Handling | 72.97 ns | 10.46 ns | 39.4 | 40 B | 40 B | 100 |
| Custom Conversion | 124.54 ns | 76.23 ns | 78.4 | 88 B | 88 B | 100 |
| Polymorphic Mapping | 317.07 ns | 36.18 ns | 34.2 | 144 B | 144 B | 100 |
| Prepare Configuration | 14.17 ms | 0 ns | 0.027 | 624.41 KB | 0 B | 0.613 |
| Prepare And Simple Map | 14.52 ms | 9.89 ns | 0.087 | 656.73 KB | 56 B | 1.091 |
Basic
Compared libraries (4)
| AutoMapper 16.2.0 A convention-based object-object mapper with runtime configuration and compiled mapping plans. |
Compare → | |
| Hand-coded Direct object mapping written in C# without a mapping library. |
Compare → | |
| Mapperly 4.3.1 A source generator that creates readable object mapping code at compile time. |
Compare → | |
| Mapster 10.0.11 An object mapper with runtime configuration, expression compilation, and projection support. |
Compare → |
Benchmark scenarios (10)
Maps one object with scalar values to a newly allocated destination object.
Maps an order with nested customer and address objects to a new destination graph.
Maps an array of 100 objects while preserving count, order and member values.
Maps nested customer values into a flat order summary through member-path configuration.
Overwrites a supplied destination object and returns that same instance.
Preserves null text, nested object and collection members in the destination.
Maps string values through registered code and invariant decimal conversions.
Maps a base array containing cats and dogs to matching destination runtime types.
Creates the complete mapper configuration and eagerly prepares its runtime mapping plans.
Creates the complete mapper configuration and maps one simple object.
Microsoft.Extensions.Validation leads the current rating · 4 libraries · 10 scenarios
In every scenario the fastest library scores 100 points and the one allocating least scores 100 more; four times slower is half the points, and an unsupported scenario is worth nothing. Time and memory reach 1000 each here, so the maximum is 2000. See workflows/rating.md.
| # | Library | Scenarios | Time | Memory | Points | Group wins |
|---|---|---|---|---|---|---|
| 1 | Microsoft.Extensions.Validation | 8/10 | 745 | 783 | 1528 | gold in Basic, silver in Object Graph, silver in Prepare, bronze in Rules |
| 2 | DataAnnotations | 9/10 | 732 | 738 | 1470 | gold in Prepare, gold in Rules, bronze in Object Graph |
| 3 | MiniValidation | 8/10 | 741 | 724 | 1465 | gold in Object Graph, silver in Basic, bronze in Prepare |
| 4 | FluentValidation | 10/10 | 733 | 672 | 1405 | silver in Rules, bronze in Basic |
How the points were earned — every scenario, with the measurements behind it
Each row is one scenario. Best is the lowest result among the rated libraries
that completed it, and the points follow from the two figures beside them:
100 × √((best + step) / (result + step)), with a step of 1 ns for time and 24 B
for memory. A dash means the library did not complete the scenario, and it scores
nothing for it. Add the two Points columns over every scenario and you get the
rating above. The same breakdown appears as a hint on any points value in the
application.
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Valid Object | 459.25 ns | 165.36 ns | 60.1 | 712 B | 632 B | 94.4 |
| Single Failure | 573.35 ns | 573.35 ns | 100 | 984 B | 984 B | 100 |
| Multiple Failures | 843.06 ns | 843.06 ns | 100 | 1.37 KB | 1.37 KB | 100 |
| Nested Object | 695.63 ns | 695.63 ns | 100 | 1.55 KB | 1.55 KB | 100 |
| Collection | 1.89 μs | 1.47 μs | 88.3 | 3.55 KB | 2.77 KB | 88.4 |
| Conditional Rule | 232.04 ns | 218.03 ns | 96.9 | 864 B | 864 B | 100 |
| Custom Rule | 372.69 ns | 372.69 ns | 100 | 936 B | 936 B | 100 |
| Stop On First Failure | — | 266.45 ns | 0 | — | 576 B | 0 |
| Async Validation | — | 2.37 μs | 0 | — | 2.68 KB | 0 |
| Prepare Validator | 0 ns | 0 ns | 100 | 0 B | 0 B | 100 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Valid Object | 814.19 ns | 165.36 ns | 45.2 | 1.8 KB | 632 B | 59.2 |
| Single Failure | 869.57 ns | 573.35 ns | 81.2 | 1.88 KB | 984 B | 71.9 |
| Multiple Failures | 1.33 μs | 843.06 ns | 79.5 | 2.41 KB | 1.37 KB | 75.5 |
| Nested Object | 1.03 μs | 695.63 ns | 82.1 | 2.31 KB | 1.55 KB | 82 |
| Collection | 2.27 μs | 1.47 μs | 80.5 | 5.27 KB | 2.77 KB | 72.7 |
| Conditional Rule | 356.57 ns | 218.03 ns | 78.3 | 1.2 KB | 864 B | 84.4 |
| Custom Rule | 511.98 ns | 372.69 ns | 85.4 | 1.08 KB | 936 B | 92.3 |
| Stop On First Failure | 266.45 ns | 266.45 ns | 100 | 576 B | 576 B | 100 |
| Async Validation | — | 2.37 μs | 0 | — | 2.68 KB | 0 |
| Prepare Validator | 0 ns | 0 ns | 100 | 0 B | 0 B | 100 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Valid Object | 342.17 ns | 165.36 ns | 69.6 | 760 B | 632 B | 91.5 |
| Single Failure | 615.01 ns | 573.35 ns | 96.6 | 1.34 KB | 984 B | 85.1 |
| Multiple Failures | 999.07 ns | 843.06 ns | 91.9 | 2.16 KB | 1.37 KB | 79.7 |
| Nested Object | 813.72 ns | 695.63 ns | 92.5 | 1.86 KB | 1.55 KB | 91.3 |
| Collection | 1.47 μs | 1.47 μs | 100 | 2.77 KB | 2.77 KB | 100 |
| Conditional Rule | 218.03 ns | 218.03 ns | 100 | 1008 B | 864 B | 92.8 |
| Custom Rule | 458.44 ns | 372.69 ns | 90.2 | 1.31 KB | 936 B | 83.8 |
| Stop On First Failure | — | 266.45 ns | 0 | — | 576 B | 0 |
| Async Validation | — | 2.37 μs | 0 | — | 2.68 KB | 0 |
| Prepare Validator | 0 ns | 0 ns | 100 | 0 B | 0 B | 100 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| Valid Object | 165.36 ns | 165.36 ns | 100 | 632 B | 632 B | 100 |
| Single Failure | 646.35 ns | 573.35 ns | 94.2 | 1.76 KB | 984 B | 74.3 |
| Multiple Failures | 2.22 μs | 843.06 ns | 61.7 | 6.02 KB | 1.37 KB | 48 |
| Nested Object | 862.67 ns | 695.63 ns | 89.8 | 2.38 KB | 1.55 KB | 80.8 |
| Collection | 2.6 μs | 1.47 μs | 75.3 | 6.57 KB | 2.77 KB | 65.1 |
| Conditional Rule | 580.89 ns | 218.03 ns | 61.4 | 1.77 KB | 864 B | 69.6 |
| Custom Rule | 579.85 ns | 372.69 ns | 80.2 | 1.85 KB | 936 B | 70.7 |
| Stop On First Failure | 569.07 ns | 266.45 ns | 68.5 | 1.76 KB | 576 B | 57.4 |
| Async Validation | 2.37 μs | 2.37 μs | 100 | 2.68 KB | 2.68 KB | 100 |
| Prepare Validator | 2.18 μs | 0 ns | 2.143 | 6.33 KB | 0 B | 6.075 |
Basic
Compared libraries (4)
| DataAnnotations The validation attributes and validation APIs included with the .NET framework. |
Compare → | |
| FluentValidation 12.1.1 A strongly typed validation library with fluent rules, nested validators, cascade modes, and asynchronous validation. |
Compare → | |
| Microsoft.Extensions.Validation 10.0.10 The official source-generated validation infrastructure for DataAnnotations-based object graph validation outside ASP.NET Core. |
Compare → | |
| MiniValidation 0.10.0 A minimal DataAnnotations-based validator with recursive object graph traversal and cycle detection. |
Compare → |
Benchmark scenarios (10)
Validates one object whose scalar properties satisfy every rule.
Validates one object and returns its single property failure.
Validates one object and materializes three independent property failures.
Traverses a nested object and reports the complete failing property path.
Traverses three collection elements and reports an indexed failure path.
Applies a tax ID rule only when the input represents a business.
Applies a custom predicate that accepts only even integer codes.
Stops validation after the first failing rule in the declared order.
Runs a deterministic asynchronous availability rule through the library async API.
Creates the complete scalar validator or rule graph without validating an input.
SharpZipLib leads the current rating · 3 libraries · 13 scenarios
In every scenario the fastest library scores 100 points and the one allocating least scores 100 more; four times slower is half the points, and an unsupported scenario is worth nothing. Time and memory reach 1300 each here, so the maximum is 2600. See workflows/rating.md.
| # | Library | Scenarios | Time | Memory | Points | Group wins |
|---|---|---|---|---|---|---|
| 1 | SharpZipLib | 13/13 | 1147 | 1058 | 2205 | gold in Advanced, gold in Metadata, silver in Read, silver in Write |
| 2 | System.IO.Compression | 12/13 | 1166 | 968 | 2134 | gold in Read, gold in Write, silver in Metadata, bronze in Advanced |
| 3 | SharpCompress | 13/13 | 881 | 886 | 1767 | silver in Advanced, bronze in Metadata, bronze in Read, bronze in Write |
How the points were earned — every scenario, with the measurements behind it
Each row is one scenario. Best is the lowest result among the rated libraries
that completed it, and the points follow from the two figures beside them:
100 × √((best + step) / (result + step)), with a step of 1 ns for time and 24 B
for memory. A dash means the library did not complete the scenario, and it scores
nothing for it. Add the two Points columns over every scenario and you get the
rating above. The same breakdown appears as a hint on any points value in the
application.
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| List Entries | 228.67 μs | 228.67 μs | 100 | 305.15 KB | 305.15 KB | 100 |
| Find Entry By Name | 230.4 μs | 198 μs | 92.7 | 305.23 KB | 305.23 KB | 100 |
| Read Stored Entry | 13.83 ms | 13.83 ms | 100 | 1.02 KB | 1.02 KB | 100 |
| Decompress Entry | 14.37 ms | 14.06 ms | 98.9 | 41.05 KB | 5.38 KB | 36.3 |
| Extract Many Small Entries | 17.28 ms | 15.19 ms | 93.7 | 35.98 MB | 987.53 KB | 16.4 |
| Create Stored Archive | 342.29 μs | 216.72 μs | 79.6 | 957.7 KB | 645.86 KB | 82.1 |
| Create Deflate Fast Archive | 2.12 ms | 680.25 μs | 56.6 | 622.91 KB | 329.69 KB | 72.8 |
| Create Deflate Optimal Archive | 2.57 ms | 1.18 ms | 67.9 | 621.27 KB | 193.67 KB | 55.8 |
| Create Many Small Entries | 6.4 ms | 4.69 ms | 85.7 | 13.99 MB | 12.66 MB | 95.1 |
| Append Entry | 212.37 μs | 203.54 μs | 97.9 | 398.18 KB | 394.87 KB | 99.6 |
| Sequential Non-Seekable Read | 16.03 ms | 16.03 ms | 100 | 458.67 KB | 458.67 KB | 100 |
| Read Zip64 Archive | 31.28 ms | 31.28 ms | 100 | 19.5 MB | 19.5 MB | 100 |
| Read AES Encrypted Entry | 2.91 ms | 1.59 ms | 73.8 | 43.93 KB | 43.93 KB | 100 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| List Entries | 233.73 μs | 228.67 μs | 98.9 | 659.41 KB | 305.15 KB | 68 |
| Find Entry By Name | 198 μs | 198 μs | 100 | 659.37 KB | 305.23 KB | 68 |
| Read Stored Entry | 13.92 ms | 13.83 ms | 99.7 | 5.12 KB | 1.02 KB | 45 |
| Decompress Entry | 14.06 ms | 14.06 ms | 100 | 5.38 KB | 5.38 KB | 100 |
| Extract Many Small Entries | 15.19 ms | 15.19 ms | 100 | 987.53 KB | 987.53 KB | 100 |
| Create Stored Archive | 216.72 μs | 216.72 μs | 100 | 645.86 KB | 645.86 KB | 100 |
| Create Deflate Fast Archive | 680.25 μs | 680.25 μs | 100 | 329.69 KB | 329.69 KB | 100 |
| Create Deflate Optimal Archive | 1.18 ms | 1.18 ms | 100 | 193.67 KB | 193.67 KB | 100 |
| Create Many Small Entries | 4.69 ms | 4.69 ms | 100 | 12.66 MB | 12.66 MB | 100 |
| Append Entry | 203.54 μs | 203.54 μs | 100 | 394.87 KB | 394.87 KB | 100 |
| Sequential Non-Seekable Read | 18.03 ms | 16.03 ms | 94.3 | 16.84 MB | 458.67 KB | 16.3 |
| Read Zip64 Archive | 58.72 ms | 31.28 ms | 73 | 39.39 MB | 19.5 MB | 70.4 |
| Read AES Encrypted Entry | — | 1.59 ms | 0 | — | 43.93 KB | 0 |
| Scenario | Time | Best | Points | Memory | Best | Points |
|---|---|---|---|---|---|---|
| List Entries | 984.86 μs | 228.67 μs | 48.2 | 660.69 KB | 305.15 KB | 68 |
| Find Entry By Name | 901.14 μs | 198 μs | 46.9 | 660.55 KB | 305.23 KB | 68 |
| Read Stored Entry | 13.94 ms | 13.83 ms | 99.6 | 67.85 KB | 1.02 KB | 12.4 |
| Decompress Entry | 14.66 ms | 14.06 ms | 97.9 | 33.56 KB | 5.38 KB | 40.1 |
| Extract Many Small Entries | 17.29 ms | 15.19 ms | 93.7 | 2.27 MB | 987.53 KB | 65.2 |
| Create Stored Archive | 1.04 ms | 216.72 μs | 45.6 | 646.26 KB | 645.86 KB | 100 |
| Create Deflate Fast Archive | 2.9 ms | 680.25 μs | 48.4 | 345.04 KB | 329.69 KB | 97.8 |
| Create Deflate Optimal Archive | 3.4 ms | 1.18 ms | 59 | 344.59 KB | 193.67 KB | 75 |
| Create Many Small Entries | 21.27 ms | 4.69 ms | 47 | 12.69 MB | 12.66 MB | 99.9 |
| Append Entry | 1.07 ms | 203.54 μs | 43.7 | 721.34 KB | 394.87 KB | 74 |
| Sequential Non-Seekable Read | 17.88 ms | 16.03 ms | 94.7 | 2.28 MB | 458.67 KB | 44.3 |
| Read Zip64 Archive | 99.09 ms | 31.28 ms | 56.2 | 38.07 MB | 19.5 MB | 71.6 |
| Read AES Encrypted Entry | 1.59 ms | 1.59 ms | 100 | 89.79 KB | 43.93 KB | 70 |
Metadata
Compared libraries (3)
| SharpCompress 0.50.3 A fully managed archive library with random-access, forward-only, non-seekable, encrypted, and asynchronous ZIP APIs. |
Compare → | |
| SharpZipLib 1.4.2 A mature managed compression library supporting ZIP, Zip64, stored and deflate entries, streaming, and AES encryption. |
Compare → | |
| System.IO.Compression The ZIP implementation included with .NET, exposing ZipArchive, ZipArchiveEntry, and ZipFile APIs. |
Compare → |
Benchmark scenarios (13)
Opens a ZIP archive and enumerates 1,000 entry names and sizes.
Opens a 1,000-entry ZIP archive and locates its final entry by exact name.
Opens and reads one uncompressed 4 MiB ZIP entry.
Opens and inflates one 4 MiB deflated ZIP entry.
Opens and reads all 1,000 small entries from a ZIP archive.
Creates a stored ZIP archive containing a deterministic mixed corpus.
Creates a Deflate level 1 ZIP archive containing the deterministic mixed corpus.
Creates a Deflate level 6 ZIP archive containing the deterministic mixed corpus.
Creates a stored ZIP archive containing 1,000 small files.
Opens an existing ZIP archive for update and appends one stored entry.
Reads all entries through a forward-only ZIP API from a non-seekable stream.
Opens and enumerates a Zip64 archive containing 65,536 entries.
Opens and decrypts one AES-256 encrypted ZIP entry.
The complete workflow requires:
- a 64-bit operating system supported by the .NET 10 SDK;
- the .NET 10 SDK available as
dotnetonPATH; - access to the configured NuGet sources on the first run, or a populated local package cache;
- a writable repository checkout and several GB of free space for build, BenchmarkDotNet, report, and Web artifacts;
- at least 8 GB of RAM as a practical minimum.
For meaningful performance comparisons, run on an otherwise idle machine, connected to power, without a debugger, with a fixed performance-oriented power profile. Do not combine results produced by different frameworks, runtimes, operating systems, architectures, or processors without reviewing the recorded benchmark environment.
Run the complete reproducible workflow:
dotnet run --project .\build -- reproduceThe target validates and benchmarks every library, regenerates reports, charts,
metadata, README, and Rider configurations, and starts the local Web application
on an automatically selected available port. Use --no-browser to suppress
automatic browser opening. Press Ctrl+C to stop the local application.
To use the reports already on disk and go directly to artifact generation and the local application:
dotnet run --project .\build -- reproduce --skip-benchmarksChild-process output is saved under artifacts/logs; the console shows concise
progress and prints the relevant log tail if an operation fails.
The Run .NET Matrix Reports GitHub Actions workflow produces one
matrix-reports archive containing every category report, the raw
BenchmarkDotNet evidence, summaries, a manifest, and SHA-256 checksums. Download
that archive and import the complete verified snapshot manually with:
dotnet run --project .\build -- import-reports --archive .\matrix-reports.zipRepository report JSON files and their evidence are updated under reports from
the same archive. Evidence is committed with the report, so a Git tag preserves
the measurements and their provenance together.
To regenerate source-controlled artifacts without starting the local application:
dotnet run --project .\build -- finalize-commitRunning the complete benchmark matrix can take a long time. Use
dotnet run --project .\build -- --helpto find commands for a single category or library.
The application reads five optional query parameters, so a page about a library can link straight to the relevant comparison instead of the front page:
| Link | Opens |
|---|---|
| https://matrix.dev-team.org/ | the default category, newest reports |
| https://matrix.dev-team.org/?category=csv-processing | that category |
| https://matrix.dev-team.org/?library=CsvHelper | the library overview, in its own category |
| https://matrix.dev-team.org/?version=latest&library=CsvHelper | the same overview, newest release named explicitly |
| https://matrix.dev-team.org/?category=csv-processing&libraries=CsvHelper | that category, narrowed to one library |
| https://matrix.dev-team.org/?category=csv-processing&features=ReadSimpleRows | that category, narrowed to one scenario |
The five are independent and combine freely; the links in the tables above are the same thing with the values filled in.
Accepts the category id or its displayed name, for example ?category=csv-processing.
Matching ignores case, spaces and punctuation.
Accepts the library id, its displayed name or its NuGet package id, and finds the
category on its own, so ?library=CsvHelper needs no category beside it.
Add category only to break a tie between two categories that use the same library
id. The library overview opens as a dialog over the matrix.
Narrows the comparison to the libraries you name, for example
?libraries=CsvHelper. Ids, displayed names and NuGet package ids all
work, separated by commas and matched the same forgiving way as category. Start the
list with - to name what to leave out instead, as in ?libraries=-CsvHelper, and
use none for an empty comparison.
This one changes the numbers, which is why it is in the address at all: points are measured against the best result among the compared libraries, so a link that dropped the selection would show a different rating under the same names. Leave it out for the whole category — that is the default view, and the reason it carries no parameter. Ticking boxes in the application writes it for you, taking whichever list is shorter.
Narrows the comparison to the scenarios you name, for example
?features=ReadSimpleRows. Scenario ids and displayed names both work,
separated by commas and matched the same forgiving way as category. Start the list
with - to name what to leave out instead, and use none for an empty comparison —
the same spelling as libraries.
It changes the numbers for the same reason libraries does: a score is the sum over
the scenarios compared, so dropping the ones a project does not need reranks the
libraries around the ones it does. The feature matrix, the benchmark charts, the
overview groups and the rating all read the one selection, and a group left without
scenarios disappears rather than being drawn empty. Leave the parameter out for every
scenario of the category — that is the default view.
Pins the reports to one release. It takes a release name exactly as the picker shows
it, for example ?version=1.2.0, or the word latest. Unlike the other two, the
value is matched exactly: dropping punctuation would make 1.2.3 and 12.3
indistinguishable.
Leave it out to follow every new release — a link without it always shows the newest reports, which is what a page about a library normally wants. Use it when the link has to keep showing the numbers it was written against, for example next to a quoted result in an article.
The release picker in the application writes the parameter into the address, and the copy buttons follow the same rule: the release appears in the copied link only while an older one is being viewed.
An unknown value of any of them falls back to the default view rather than to an error, so a typo in a link published elsewhere still lands the reader in the matrix.










































































































