chore: update benchmark results in README#123
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.574 μs | 0.1139 μs | 0.0062 μs | 1.567 μs | 1.573 μs | 1.580 μs | 1.00 | 0.00 | 1 | 0.3529 | 0.0114 | 8.65 KB | 1.00 |
| EggMapper | 1.756 μs | 0.0542 μs | 0.0030 μs | 1.753 μs | 1.756 μs | 1.759 μs | 1.12 | 0.00 | 1 | 0.3529 | 0.0114 | 8.65 KB | 1.00 |
| AutoMapper | 2.347 μs | 0.2894 μs | 0.0159 μs | 2.335 μs | 2.340 μs | 2.365 μs | 1.49 | 0.01 | 1 | 0.4044 | 0.0114 | 9.95 KB | 1.15 |
| Mapster | 1.631 μs | 0.2195 μs | 0.0120 μs | 1.618 μs | 1.633 μs | 1.642 μs | 1.04 | 0.01 | 1 | 0.3529 | 0.0114 | 8.65 KB | 1.00 |
| MapperlyMap | 1.996 μs | 0.5261 μs | 0.0288 μs | 1.968 μs | 1.993 μs | 2.026 μs | 1.27 | 0.02 | 1 | 0.3510 | 0.0076 | 8.65 KB | 1.00 |
| AgileMapper | 2.568 μs | 0.7871 μs | 0.0431 μs | 2.524 μs | 2.569 μs | 2.610 μs | 1.63 | 0.02 | 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.410 μs | 1.0008 μs | 0.0549 μs | 5.360 μs | 5.401 μs | 5.469 μs | 1.00 | 0.01 | 1 | 1.1139 | 0.0610 | 27.4 KB | 1.00 |
| EggMapper | 5.781 μs | 2.0004 μs | 0.1096 μs | 5.694 μs | 5.744 μs | 5.904 μs | 1.07 | 0.02 | 1 | 1.1139 | 0.0610 | 27.4 KB | 1.00 |
| AutoMapper | 6.755 μs | 3.1989 μs | 0.1753 μs | 6.622 μs | 6.690 μs | 6.954 μs | 1.25 | 0.03 | 1 | 1.1673 | 0.0687 | 28.7 KB | 1.05 |
| Mapster | 6.004 μs | 2.6147 μs | 0.1433 μs | 5.902 μs | 5.942 μs | 6.168 μs | 1.11 | 0.02 | 1 | 1.1139 | 0.0610 | 27.4 KB | 1.00 |
| MapperlyMap | 5.360 μs | 1.3012 μs | 0.0713 μs | 5.277 μs | 5.397 μs | 5.405 μs | 0.99 | 0.01 | 1 | 1.1139 | 0.0610 | 27.42 KB | 1.00 |
| AgileMapper | 5.230 μs | 0.1798 μs | 0.0099 μs | 5.223 μs | 5.226 μs | 5.242 μs | 0.97 | 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 | 17.12 μs | 5.577 μs | 0.306 μs | 16.92 μs | 16.98 μs | 17.48 μs | 1.00 | 0.02 | 1 | 3.4790 | 0.8545 | 85.99 KB | 1.00 |
| EggMapper | 17.27 μs | 5.325 μs | 0.292 μs | 16.93 μs | 17.40 μs | 17.47 μs | 1.01 | 0.02 | 1 | 3.4790 | 0.8545 | 85.99 KB | 1.00 |
| AutoMapper | 21.54 μs | 3.664 μs | 0.201 μs | 21.39 μs | 21.47 μs | 21.77 μs | 1.26 | 0.02 | 2 | 3.8452 | 0.9460 | 94.34 KB | 1.10 |
| Mapster | 16.25 μs | 8.047 μs | 0.441 μs | 15.85 μs | 16.17 μs | 16.73 μs | 0.95 | 0.03 | 1 | 3.4790 | 0.8545 | 85.99 KB | 1.00 |
| MapperlyMap | 17.32 μs | 10.792 μs | 0.592 μs | 16.63 μs | 17.60 μs | 17.71 μs | 1.01 | 0.03 | 1 | 3.5095 | 0.8545 | 86.02 KB | 1.00 |
| AgileMapper | 21.95 μs | 6.874 μs | 0.377 μs | 21.64 μs | 21.84 μs | 22.37 μs | 1.28 | 0.03 | 2 | 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,341.300 μs | 1,488.644 μs | 81.5976 μs | 1,283.721 μs | 1,305.501 μs | 1,434.678 μs | 1.002 | 0.07 | 3 | 1.9531 | - | 95.12 KB | 1.00 |
| AutoMapperStartup | 396.219 μs | 364.562 μs | 19.9829 μs | 380.462 μs | 389.500 μs | 418.696 μs | 0.296 | 0.02 | 2 | 3.9063 | - | 104.22 KB | 1.10 |
| MapsterStartup | 2.774 μs | 1.095 μs | 0.0600 μs | 2.726 μs | 2.755 μs | 2.841 μ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.388 ms | 1.858 ms | 0.1018 ms | 1.325 ms | 1.333 ms | 1.506 ms | 1.00 | 0.09 | 1 | 3.9063 | 1.9531 | 96.06 KB | 1.00 |
| AutoMapper | 4.278 ms | 8.600 ms | 0.4714 ms | 3.756 ms | 4.406 ms | 4.672 ms | 3.09 | 0.35 | 2 | 7.8125 | - | 309.95 KB | 3.23 |
| Mapster | 4.331 ms | 7.485 ms | 0.4103 ms | 3.867 ms | 4.476 ms | 4.649 ms | 3.13 | 0.32 | 2 | 23.4375 | 15.6250 | 757.71 KB | 7.89 |
📝 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 #178.