chore: update benchmark results in README#92
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.729 μs | 0.6941 μs | 0.0380 μs | 1.687 μs | 1.740 μs | 1.760 μs | 1.00 | 0.03 | 1 | 0.3529 | 0.0114 | 8.65 KB | 1.00 |
| EggMapper | 1.784 μs | 0.3766 μs | 0.0206 μs | 1.763 μs | 1.787 μs | 1.804 μs | 1.03 | 0.02 | 1 | 0.3529 | 0.0114 | 8.65 KB | 1.00 |
| AutoMapper | 2.281 μs | 0.7349 μs | 0.0403 μs | 2.254 μs | 2.263 μs | 2.328 μs | 1.32 | 0.03 | 1 | 0.4044 | 0.0114 | 9.95 KB | 1.15 |
| Mapster | 1.733 μs | 0.2476 μs | 0.0136 μs | 1.718 μs | 1.740 μs | 1.743 μs | 1.00 | 0.02 | 1 | 0.3529 | 0.0114 | 8.65 KB | 1.00 |
| MapperlyMap | 1.948 μs | 0.6367 μs | 0.0349 μs | 1.913 μs | 1.947 μs | 1.983 μs | 1.13 | 0.03 | 1 | 0.3510 | 0.0076 | 8.65 KB | 1.00 |
| AgileMapper | 2.403 μs | 0.8114 μs | 0.0445 μs | 2.357 μs | 2.405 μs | 2.446 μs | 1.39 | 0.03 | 1 | 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.157 μs | 1.0703 μs | 0.0587 μs | 5.093 μs | 5.170 μs | 5.209 μs | 1.00 | 0.01 | 1 | 1.1139 | 0.0610 | 27.4 KB | 1.00 |
| EggMapper | 5.527 μs | 0.4490 μs | 0.0246 μs | 5.502 μs | 5.529 μs | 5.551 μs | 1.07 | 0.01 | 1 | 1.1139 | 0.0610 | 27.4 KB | 1.00 |
| AutoMapper | 6.678 μs | 1.5496 μs | 0.0849 μs | 6.590 μs | 6.686 μs | 6.759 μs | 1.29 | 0.02 | 1 | 1.1673 | 0.0687 | 28.7 KB | 1.05 |
| Mapster | 5.913 μs | 0.9744 μs | 0.0534 μs | 5.877 μs | 5.887 μs | 5.974 μs | 1.15 | 0.01 | 1 | 1.1139 | 0.0610 | 27.4 KB | 1.00 |
| MapperlyMap | 5.251 μs | 1.4671 μs | 0.0804 μs | 5.163 μs | 5.269 μs | 5.321 μs | 1.02 | 0.02 | 1 | 1.1139 | 0.0610 | 27.42 KB | 1.00 |
| AgileMapper | 5.077 μs | 0.8424 μs | 0.0462 μs | 5.024 μs | 5.103 μs | 5.105 μs | 0.98 | 0.01 | 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 | 16.40 μs | 1.987 μs | 0.109 μs | 16.30 μs | 16.39 μs | 16.52 μs | 1.00 | 0.01 | 1 | 3.4790 | 0.8545 | 85.99 KB | 1.00 |
| EggMapper | 17.24 μs | 5.666 μs | 0.311 μs | 17.01 μs | 17.12 μs | 17.60 μs | 1.05 | 0.02 | 1 | 3.4790 | 0.8545 | 85.99 KB | 1.00 |
| AutoMapper | 21.69 μs | 4.333 μs | 0.237 μs | 21.42 μs | 21.79 μs | 21.87 μs | 1.32 | 0.01 | 1 | 3.8452 | 0.9460 | 94.34 KB | 1.10 |
| Mapster | 16.57 μs | 1.290 μs | 0.071 μs | 16.50 μs | 16.58 μs | 16.64 μs | 1.01 | 0.01 | 1 | 3.4790 | 0.8545 | 85.99 KB | 1.00 |
| MapperlyMap | 17.48 μs | 1.879 μs | 0.103 μs | 17.41 μs | 17.43 μs | 17.60 μs | 1.07 | 0.01 | 1 | 3.5095 | 0.8545 | 86.02 KB | 1.00 |
| AgileMapper | 19.57 μs | 1.272 μs | 0.070 μs | 19.50 μs | 19.56 μs | 19.64 μs | 1.19 | 0.01 | 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,333.469 μs | 1,043.6032 μs | 57.2034 μs | 1,279.798 μs | 1,326.959 μs | 1,393.648 μs | 1.001 | 0.05 | 3 | 3.9063 | 1.9531 | 95.98 KB | 1.00 |
| AutoMapperStartup | 403.881 μs | 656.1822 μs | 35.9676 μs | 367.585 μs | 404.549 μs | 439.510 μs | 0.303 | 0.03 | 2 | 3.9063 | - | 104.07 KB | 1.08 |
| MapsterStartup | 2.779 μs | 0.2079 μs | 0.0114 μs | 2.766 μs | 2.785 μs | 2.786 μ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.346 ms | 2.086 ms | 0.1144 ms | 1.220 ms | 1.377 ms | 1.443 ms | 1.00 | 0.11 | 1 | 3.9063 | 1.9531 | 96.06 KB | 1.00 |
| AutoMapper | 3.766 ms | 8.053 ms | 0.4414 ms | 3.410 ms | 3.627 ms | 4.260 ms | 2.81 | 0.36 | 2 | 7.8125 | - | 310.24 KB | 3.23 |
| Mapster | 4.232 ms | 9.048 ms | 0.4960 ms | 3.686 ms | 4.354 ms | 4.655 ms | 3.16 | 0.40 | 2 | 23.4375 | 15.6250 | 757.4 KB | 7.88 |
📝 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 #135.