chore: update benchmark results in README#90
Merged
cloud-hai-vo merged 1 commit intomainfrom Mar 27, 2026
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.787 μs | 0.2314 μs | 0.0127 μs | 1.775 μs | 1.785 μs | 1.800 μs | 1.00 | 0.01 | 1 | 0.5283 | 0.0172 | 8.65 KB | 1.00 |
| EggMapper | 1.658 μs | 0.2837 μs | 0.0155 μs | 1.640 μs | 1.666 μs | 1.668 μs | 0.93 | 0.01 | 1 | 0.5283 | 0.0172 | 8.65 KB | 1.00 |
| AutoMapper | 2.287 μs | 0.4824 μs | 0.0264 μs | 2.262 μs | 2.286 μs | 2.315 μs | 1.28 | 0.02 | 2 | 0.6065 | 0.0191 | 9.95 KB | 1.15 |
| Mapster | 1.782 μs | 0.1593 μs | 0.0087 μs | 1.776 μs | 1.777 μs | 1.792 μs | 1.00 | 0.01 | 1 | 0.5283 | 0.0172 | 8.65 KB | 1.00 |
| MapperlyMap | 1.891 μs | 0.6323 μs | 0.0347 μs | 1.856 μs | 1.892 μs | 1.925 μs | 1.06 | 0.02 | 1 | 0.5283 | 0.0172 | 8.65 KB | 1.00 |
| AgileMapper | 2.643 μs | 0.1338 μs | 0.0073 μs | 2.639 μs | 2.639 μs | 2.652 μs | 1.48 | 0.01 | 2 | 0.5417 | 0.0153 | 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.532 μs | 0.4694 μs | 0.0257 μs | 5.505 μs | 5.534 μs | 5.557 μs | 1.00 | 0.01 | 1 | 1.6708 | 0.0916 | 27.4 KB | 1.00 |
| EggMapper | 5.908 μs | 3.2619 μs | 0.1788 μs | 5.702 μs | 5.997 μs | 6.024 μs | 1.07 | 0.03 | 1 | 1.6708 | 0.0916 | 27.4 KB | 1.00 |
| AutoMapper | 6.963 μs | 1.0369 μs | 0.0568 μs | 6.908 μs | 6.958 μs | 7.022 μs | 1.26 | 0.01 | 1 | 1.7548 | 0.1068 | 28.7 KB | 1.05 |
| Mapster | 6.163 μs | 1.2484 μs | 0.0684 μs | 6.091 μs | 6.169 μs | 6.227 μs | 1.11 | 0.01 | 1 | 1.6708 | 0.0916 | 27.4 KB | 1.00 |
| MapperlyMap | 5.425 μs | 1.3921 μs | 0.0763 μs | 5.343 μs | 5.438 μs | 5.494 μs | 0.98 | 0.01 | 1 | 1.6785 | 0.0992 | 27.42 KB | 1.00 |
| AgileMapper | 5.283 μs | 1.0585 μs | 0.0580 μs | 5.240 μs | 5.261 μs | 5.349 μs | 0.96 | 0.01 | 1 | 1.0223 | 0.0610 | 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 | 18.24 μs | 4.894 μs | 0.268 μs | 17.98 μs | 18.24 μs | 18.52 μs | 1.00 | 0.02 | 1 | 5.2490 | 1.3123 | 85.99 KB | 1.00 |
| EggMapper | 17.56 μs | 4.980 μs | 0.273 μs | 17.28 μs | 17.56 μs | 17.83 μs | 0.96 | 0.02 | 1 | 5.2490 | 1.3123 | 85.99 KB | 1.00 |
| AutoMapper | 22.91 μs | 5.562 μs | 0.305 μs | 22.56 μs | 23.06 μs | 23.12 μs | 1.26 | 0.02 | 1 | 5.7678 | 1.4343 | 94.34 KB | 1.10 |
| Mapster | 19.16 μs | 2.916 μs | 0.160 μs | 18.98 μs | 19.19 μs | 19.30 μs | 1.05 | 0.02 | 1 | 5.2490 | 1.3123 | 85.99 KB | 1.00 |
| MapperlyMap | 19.94 μs | 2.323 μs | 0.127 μs | 19.82 μs | 19.94 μs | 20.07 μs | 1.09 | 0.02 | 1 | 5.2490 | 1.2817 | 86.02 KB | 1.00 |
| AgileMapper | 22.04 μs | 2.600 μs | 0.143 μs | 21.90 μs | 22.02 μs | 22.18 μs | 1.21 | 0.02 | 1 | 5.2795 | 1.3123 | 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,327.471 μs | 850.1570 μs | 46.6000 μs | 1,289.298 μs | 1,313.714 μs | 1,379.401 μs | 1.001 | 0.04 | 3 | 5.8594 | - | 95.62 KB | 1.00 |
| AutoMapperStartup | 428.081 μs | 235.2054 μs | 12.8924 μs | 414.024 μs | 430.866 μs | 439.354 μs | 0.323 | 0.01 | 2 | 5.8594 | - | 104.2 KB | 1.09 |
| MapsterStartup | 2.593 μs | 0.3758 μs | 0.0206 μs | 2.578 μs | 2.585 μs | 2.616 μs | 0.002 | 0.00 | 1 | 0.7019 | 0.0267 | 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.328 ms | 1.611 ms | 0.0883 ms | 1.229 ms | 1.355 ms | 1.400 ms | 1.00 | 0.08 | 1 | 5.8594 | 3.9063 | 96.44 KB | 1.00 |
| AutoMapper | 3.956 ms | 9.406 ms | 0.5156 ms | 3.595 ms | 3.727 ms | 4.546 ms | 2.99 | 0.38 | 2 | 15.6250 | 7.8125 | 310.14 KB | 3.22 |
| Mapster | 4.336 ms | 10.191 ms | 0.5586 ms | 3.810 ms | 4.275 ms | 4.923 ms | 3.27 | 0.41 | 2 | 39.0625 | 15.6250 | 758.19 KB | 7.86 |
📝 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 #132.