chore: update benchmark results in README#125
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.814 μs | 2.1426 μs | 0.1174 μs | 1.718 μs | 1.779 μs | 1.945 μs | 1.00 | 0.08 | 1 | 0.5283 | 0.0172 | 8.65 KB | 1.00 |
| EggMapper | 1.808 μs | 0.3868 μs | 0.0212 μs | 1.784 μs | 1.817 μs | 1.824 μs | 1.00 | 0.06 | 1 | 0.5283 | 0.0172 | 8.65 KB | 1.00 |
| AutoMapper | 2.505 μs | 1.1067 μs | 0.0607 μs | 2.440 μs | 2.518 μs | 2.559 μs | 1.38 | 0.08 | 2 | 0.6065 | 0.0191 | 9.95 KB | 1.15 |
| Mapster | 1.895 μs | 0.2856 μs | 0.0157 μs | 1.878 μs | 1.900 μs | 1.908 μs | 1.05 | 0.06 | 1 | 0.5283 | 0.0172 | 8.65 KB | 1.00 |
| MapperlyMap | 1.945 μs | 1.0987 μs | 0.0602 μs | 1.876 μs | 1.970 μs | 1.988 μs | 1.07 | 0.07 | 1 | 0.5264 | 0.0153 | 8.65 KB | 1.00 |
| AgileMapper | 2.663 μs | 0.7668 μs | 0.0420 μs | 2.617 μs | 2.672 μs | 2.700 μs | 1.47 | 0.08 | 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.526 μs | 0.8392 μs | 0.0460 μs | 5.498 μs | 5.501 μs | 5.579 μs | 1.00 | 0.01 | 1 | 1.6708 | 0.0916 | 27.4 KB | 1.00 |
| EggMapper | 6.121 μs | 0.9912 μs | 0.0543 μs | 6.061 μs | 6.133 μs | 6.167 μs | 1.11 | 0.01 | 1 | 1.6708 | 0.0916 | 27.4 KB | 1.00 |
| AutoMapper | 7.068 μs | 2.5224 μs | 0.1383 μs | 6.911 μs | 7.125 μs | 7.169 μs | 1.28 | 0.02 | 1 | 1.7548 | 0.1068 | 28.7 KB | 1.05 |
| Mapster | 6.324 μs | 2.3766 μs | 0.1303 μs | 6.204 μs | 6.306 μs | 6.463 μs | 1.14 | 0.02 | 1 | 1.6708 | 0.0916 | 27.4 KB | 1.00 |
| MapperlyMap | 6.161 μs | 1.3311 μs | 0.0730 μs | 6.103 μs | 6.137 μs | 6.243 μs | 1.11 | 0.01 | 1 | 1.6785 | 0.0992 | 27.42 KB | 1.00 |
| AgileMapper | 5.727 μs | 1.7560 μs | 0.0963 μs | 5.629 μs | 5.730 μs | 5.821 μs | 1.04 | 0.02 | 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 | 17.74 μs | 3.108 μs | 0.170 μs | 17.58 μs | 17.72 μs | 17.92 μs | 1.00 | 0.01 | 1 | 5.2490 | 1.3123 | 85.99 KB | 1.00 |
| EggMapper | 18.03 μs | 4.855 μs | 0.266 μs | 17.72 μs | 18.17 μs | 18.19 μs | 1.02 | 0.02 | 1 | 5.2490 | 1.3123 | 85.99 KB | 1.00 |
| AutoMapper | 22.52 μs | 14.378 μs | 0.788 μs | 21.68 μs | 22.64 μs | 23.24 μs | 1.27 | 0.04 | 1 | 5.7678 | 1.4343 | 94.34 KB | 1.10 |
| Mapster | 18.00 μs | 5.669 μs | 0.311 μs | 17.64 μs | 18.18 μs | 18.18 μs | 1.01 | 0.02 | 1 | 5.2490 | 1.3123 | 85.99 KB | 1.00 |
| MapperlyMap | 19.57 μs | 6.054 μs | 0.332 μs | 19.20 μs | 19.66 μs | 19.85 μs | 1.10 | 0.02 | 1 | 5.2490 | 1.2817 | 86.02 KB | 1.00 |
| AgileMapper | 21.14 μs | 10.650 μs | 0.584 μs | 20.74 μs | 20.87 μs | 21.81 μs | 1.19 | 0.03 | 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,373.583 μs | 1,163.7488 μs | 63.7890 μs | 1,314.076 μs | 1,365.743 μs | 1,440.930 μs | 1.001 | 0.06 | 3 | 5.8594 | - | 95.67 KB | 1.00 |
| AutoMapperStartup | 460.038 μs | 765.0192 μs | 41.9333 μs | 417.447 μs | 461.386 μs | 501.281 μs | 0.335 | 0.03 | 2 | 5.8594 | - | 104.04 KB | 1.09 |
| MapsterStartup | 2.591 μs | 0.7054 μs | 0.0387 μs | 2.549 μs | 2.599 μs | 2.625 μ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.383 ms | 1.922 ms | 0.1054 ms | 1.273 ms | 1.394 ms | 1.483 ms | 1.00 | 0.09 | 1 | 5.8594 | 3.9063 | 96.21 KB | 1.00 |
| AutoMapper | 3.901 ms | 10.006 ms | 0.5485 ms | 3.394 ms | 3.825 ms | 4.483 ms | 2.83 | 0.39 | 2 | 15.6250 | 7.8125 | 309.84 KB | 3.22 |
| Mapster | 4.752 ms | 6.316 ms | 0.3462 ms | 4.362 ms | 4.872 ms | 5.023 ms | 3.45 | 0.32 | 3 | 46.8750 | 15.6250 | 766.15 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 #181.