chore: update benchmark results in README#124
Closed
cloud-hai-vo wants to merge 1 commit into
Closed
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.588 μs | 0.6233 μs | 0.0342 μs | 1.549 μs | 1.602 μs | 1.613 μs | 1.00 | 0.03 | 1 | 0.5283 | 0.0172 | 8.65 KB | 1.00 |
| EggMapper | 1.731 μs | 0.4480 μs | 0.0246 μs | 1.706 μs | 1.731 μs | 1.755 μs | 1.09 | 0.02 | 1 | 0.5283 | 0.0172 | 8.65 KB | 1.00 |
| AutoMapper | 2.126 μs | 1.4036 μs | 0.0769 μs | 2.066 μs | 2.098 μs | 2.213 μs | 1.34 | 0.05 | 1 | 0.6065 | 0.0191 | 9.95 KB | 1.15 |
| Mapster | 1.686 μs | 1.2764 μs | 0.0700 μs | 1.643 μs | 1.648 μs | 1.767 μs | 1.06 | 0.04 | 1 | 0.5283 | 0.0172 | 8.65 KB | 1.00 |
| MapperlyMap | 1.861 μs | 0.5637 μs | 0.0309 μs | 1.825 μs | 1.877 μs | 1.880 μs | 1.17 | 0.03 | 1 | 0.5283 | 0.0172 | 8.65 KB | 1.00 |
| AgileMapper | 2.246 μs | 1.0926 μs | 0.0599 μs | 2.177 μs | 2.274 μs | 2.287 μs | 1.41 | 0.04 | 1 | 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 | 4.876 μs | 3.3357 μs | 0.1828 μs | 4.667 μs | 4.953 μs | 5.008 μs | 1.00 | 0.05 | 1 | 1.6708 | 0.0916 | 27.4 KB | 1.00 |
| EggMapper | 4.991 μs | 1.5994 μs | 0.0877 μs | 4.913 μs | 4.975 μs | 5.086 μs | 1.02 | 0.04 | 1 | 1.6708 | 0.0916 | 27.4 KB | 1.00 |
| AutoMapper | 5.668 μs | 0.9552 μs | 0.0524 μs | 5.609 μs | 5.686 μs | 5.710 μs | 1.16 | 0.04 | 1 | 1.7548 | 0.1068 | 28.7 KB | 1.05 |
| Mapster | 5.190 μs | 1.0847 μs | 0.0595 μs | 5.150 μs | 5.162 μs | 5.258 μs | 1.07 | 0.04 | 1 | 1.6708 | 0.0916 | 27.4 KB | 1.00 |
| MapperlyMap | 4.714 μs | 0.3895 μs | 0.0213 μs | 4.689 μs | 4.724 μs | 4.729 μs | 0.97 | 0.03 | 1 | 1.6785 | 0.0992 | 27.42 KB | 1.00 |
| AgileMapper | 4.488 μs | 0.8720 μs | 0.0478 μs | 4.433 μs | 4.510 μs | 4.520 μs | 0.92 | 0.03 | 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 | 15.76 μs | 2.011 μs | 0.110 μs | 15.64 μs | 15.78 μs | 15.85 μs | 1.00 | 0.01 | 1 | 5.2490 | 1.3123 | 85.99 KB | 1.00 |
| EggMapper | 15.22 μs | 4.153 μs | 0.228 μs | 14.96 μs | 15.32 μs | 15.38 μs | 0.97 | 0.01 | 1 | 5.2490 | 1.3123 | 85.99 KB | 1.00 |
| AutoMapper | 19.26 μs | 5.309 μs | 0.291 μs | 18.93 μs | 19.41 μs | 19.46 μs | 1.22 | 0.02 | 1 | 5.7678 | 1.4343 | 94.34 KB | 1.10 |
| Mapster | 15.12 μs | 0.449 μs | 0.025 μs | 15.09 μs | 15.12 μs | 15.14 μs | 0.96 | 0.01 | 1 | 5.2490 | 1.3123 | 85.99 KB | 1.00 |
| MapperlyMap | 16.74 μs | 2.765 μs | 0.152 μs | 16.58 μs | 16.75 μs | 16.88 μs | 1.06 | 0.01 | 1 | 5.2490 | 1.2817 | 86.02 KB | 1.00 |
| AgileMapper | 17.27 μs | 4.648 μs | 0.255 μs | 16.98 μs | 17.37 μs | 17.46 μs | 1.10 | 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,125.117 μs | 467.3572 μs | 25.6174 μs | 1,099.665 μs | 1,124.789 μs | 1,150.896 μs | 1.000 | 0.03 | 3 | 3.9063 | - | 95.37 KB | 1.00 |
| AutoMapperStartup | 351.703 μs | 1,036.5123 μs | 56.8147 μs | 292.486 μs | 356.858 μs | 405.764 μs | 0.313 | 0.04 | 2 | 5.8594 | - | 103.83 KB | 1.09 |
| MapsterStartup | 1.947 μs | 0.7150 μs | 0.0392 μs | 1.921 μs | 1.927 μs | 1.992 μ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.095 ms | 1.169 ms | 0.0641 ms | 1.021 ms | 1.124 ms | 1.138 ms | 1.00 | 0.07 | 1 | 5.8594 | 3.9063 | 96.16 KB | 1.00 |
| AutoMapper | 3.743 ms | 3.211 ms | 0.1760 ms | 3.548 ms | 3.790 ms | 3.891 ms | 3.43 | 0.23 | 3 | 15.6250 | 7.8125 | 309.23 KB | 3.22 |
| Mapster | 2.326 ms | 6.218 ms | 0.3408 ms | 2.038 ms | 2.239 ms | 2.702 ms | 2.13 | 0.29 | 2 | 42.9688 | 19.5313 | 759.26 KB | 7.90 |
📝 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 #179.