chore: update benchmark results in README#128
Merged
Conversation
Contributor
📊 Benchmark Results
🔵 Flat Mapping — 10-property object
🟡 Flattening — 2 nested objects → 8 flat properties
🟣 Deep Mapping — 2 nested address objects
🟢 Complex Mapping — nested object + collection
🟠 Collection — 100-item
|
| Method | Mean | Error | StdDev | Min | Median | Max | Ratio | RatioSD | Rank | Gen0 | Gen1 | Allocated | Alloc Ratio |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Manual | 1.603 μs | 0.1708 μs | 0.0094 μs | 1.593 μs | 1.609 μs | 1.609 μs | 1.00 | 0.01 | 1 | 0.3529 | 0.0114 | 8.65 KB | 1.00 |
| EggMapper | 1.807 μs | 0.4927 μs | 0.0270 μs | 1.777 μs | 1.813 μs | 1.830 μs | 1.13 | 0.02 | 1 | 0.3529 | 0.0114 | 8.65 KB | 1.00 |
| AutoMapper | 2.361 μs | 0.6675 μs | 0.0366 μs | 2.339 μs | 2.341 μs | 2.403 μs | 1.47 | 0.02 | 2 | 0.4044 | 0.0114 | 9.95 KB | 1.15 |
| Mapster | 1.771 μs | 0.1020 μs | 0.0056 μs | 1.765 μs | 1.771 μs | 1.776 μs | 1.10 | 0.01 | 1 | 0.3529 | 0.0114 | 8.65 KB | 1.00 |
| MapperlyMap | 1.810 μs | 0.4592 μs | 0.0252 μs | 1.781 μs | 1.819 μs | 1.829 μs | 1.13 | 0.01 | 1 | 0.3529 | 0.0114 | 8.65 KB | 1.00 |
| AgileMapper | 2.331 μs | 0.2683 μs | 0.0147 μs | 2.319 μs | 2.325 μs | 2.347 μs | 1.45 | 0.01 | 2 | 0.3624 | 0.0114 | 8.91 KB | 1.03 |
🟠 Collection — 100-item List<T>
| Method | Mean | Error | StdDev | Min | Median | Max | Ratio | RatioSD | Rank | Gen0 | Gen1 | Allocated | Alloc Ratio |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Manual | 5.526 μs | 1.3425 μs | 0.0736 μs | 5.483 μs | 5.484 μs | 5.611 μs | 1.00 | 0.02 | 1 | 1.1139 | 0.0610 | 27.4 KB | 1.00 |
| EggMapper | 5.925 μs | 1.0350 μs | 0.0567 μs | 5.866 μs | 5.930 μs | 5.979 μs | 1.07 | 0.02 | 1 | 1.1139 | 0.0610 | 27.4 KB | 1.00 |
| AutoMapper | 6.728 μs | 0.1603 μs | 0.0088 μs | 6.719 μs | 6.726 μs | 6.737 μs | 1.22 | 0.01 | 1 | 1.1673 | 0.0687 | 28.7 KB | 1.05 |
| Mapster | 6.169 μs | 3.9070 μs | 0.2142 μs | 5.926 μs | 6.251 μs | 6.330 μs | 1.12 | 0.04 | 1 | 1.1139 | 0.0610 | 27.4 KB | 1.00 |
| MapperlyMap | 5.547 μs | 1.4145 μs | 0.0775 μs | 5.468 μs | 5.550 μs | 5.623 μs | 1.00 | 0.02 | 1 | 1.1139 | 0.0610 | 27.42 KB | 1.00 |
| AgileMapper | 5.370 μs | 1.9335 μs | 0.1060 μs | 5.295 μs | 5.323 μs | 5.491 μs | 0.97 | 0.02 | 1 | 0.6790 | 0.0381 | 16.72 KB | 0.61 |
🟠 Collection — 100-item List<T>
| Method | Mean | Error | StdDev | Min | Median | Max | Ratio | RatioSD | Rank | Gen0 | Gen1 | Allocated | Alloc Ratio |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Manual | 15.70 μs | 4.836 μs | 0.265 μs | 15.40 μs | 15.80 μs | 15.90 μs | 1.00 | 0.02 | 1 | 3.4790 | 0.8545 | 85.99 KB | 1.00 |
| EggMapper | 18.56 μs | 10.063 μs | 0.552 μs | 18.14 μs | 18.36 μs | 19.18 μs | 1.18 | 0.04 | 1 | 3.4790 | 0.8545 | 85.99 KB | 1.00 |
| AutoMapper | 21.51 μs | 6.012 μs | 0.330 μs | 21.14 μs | 21.63 μs | 21.77 μs | 1.37 | 0.03 | 1 | 3.8452 | 0.9460 | 94.34 KB | 1.10 |
| Mapster | 16.07 μs | 1.624 μs | 0.089 μs | 16.00 μs | 16.03 μs | 16.17 μs | 1.02 | 0.02 | 1 | 3.4790 | 0.8545 | 85.99 KB | 1.00 |
| MapperlyMap | 17.34 μs | 2.769 μs | 0.152 μs | 17.21 μs | 17.31 μs | 17.51 μs | 1.10 | 0.02 | 1 | 3.5095 | 0.8545 | 86.02 KB | 1.00 |
| AgileMapper | 21.47 μs | 2.417 μs | 0.132 μs | 21.34 μs | 21.48 μs | 21.60 μs | 1.37 | 0.02 | 1 | 3.5095 | 0.8545 | 86.25 KB | 1.00 |
⚪ Startup / Configuration time
| Method | Mean | Error | StdDev | Min | Median | Max | Ratio | RatioSD | Rank | Gen0 | Gen1 | Allocated | Alloc Ratio |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EggMapperStartup | 1,306.193 μs | 1,770.317 μs | 97.0371 μs | 1,197.771 μs | 1,335.915 μs | 1,384.893 μs | 1.004 | 0.09 | 3 | 3.9063 | 1.9531 | 96.09 KB | 1.00 |
| AutoMapperStartup | 447.392 μs | 1,262.580 μs | 69.2063 μs | 399.476 μs | 415.965 μs | 526.736 μs | 0.344 | 0.05 | 2 | 3.9063 | - | 104.62 KB | 1.09 |
| MapsterStartup | 2.749 μs | 1.144 μs | 0.0627 μs | 2.688 μs | 2.746 μs | 2.814 μs | 0.002 | 0.00 | 1 | 0.4692 | 0.0114 | 11.51 KB | 0.12 |
EggMapper.Benchmarks.ColdStartBenchmark-report-github
| Method | Mean | Error | StdDev | Min | Median | Max | Ratio | RatioSD | Rank | Gen0 | Gen1 | Allocated | Alloc Ratio |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EggMapper | 1.312 ms | 1.417 ms | 0.0777 ms | 1.239 ms | 1.303 ms | 1.393 ms | 1.00 | 0.07 | 1 | 3.9063 | - | 96.01 KB | 1.00 |
| AutoMapper | 4.193 ms | 7.660 ms | 0.4199 ms | 3.734 ms | 4.287 ms | 4.557 ms | 3.20 | 0.32 | 2 | 7.8125 | - | 310.48 KB | 3.23 |
| Mapster | 4.402 ms | 3.738 ms | 0.2049 ms | 4.167 ms | 4.497 ms | 4.541 ms | 3.36 | 0.22 | 2 | 23.4375 | 15.6250 | 764.18 KB | 7.96 |
📝 Notes
- Each benchmark class is decorated with
[MemoryDiagnoser]and[RankColumn]. - The global config (see
src/EggMapper.Benchmarks/Program.cs) addsMin,Median, andMaxcolumns. - Manual is the hand-written baseline (ratio = 1.00). A ratio < 1 means faster than manual.
- Benchmarks run on GitHub-hosted runners — absolute times may vary between runs; focus on Ratio for comparisons.
- To reproduce locally:
cd src/EggMapper.Benchmarks dotnet run --configuration Release -- --filter '*'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated benchmark update from CI run #188.