chore: update benchmark results in README#122
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 | 2.021 μs | 1.6778 μs | 0.0920 μs | 1.915 μs | 2.068 μs | 2.080 μs | 1.00 | 0.06 | 1 | 0.5264 | 0.0153 | 8.65 KB | 1.00 |
| EggMapper | 2.137 μs | 0.6968 μs | 0.0382 μs | 2.096 μs | 2.144 μs | 2.172 μs | 1.06 | 0.05 | 1 | 0.5264 | 0.0153 | 8.65 KB | 1.00 |
| AutoMapper | 2.691 μs | 2.0362 μs | 0.1116 μs | 2.602 μs | 2.654 μs | 2.816 μs | 1.33 | 0.07 | 1 | 0.6065 | 0.0191 | 9.95 KB | 1.15 |
| Mapster | 2.301 μs | 0.6461 μs | 0.0354 μs | 2.280 μs | 2.281 μs | 2.342 μs | 1.14 | 0.05 | 1 | 0.5264 | 0.0153 | 8.65 KB | 1.00 |
| MapperlyMap | 2.175 μs | 1.1499 μs | 0.0630 μs | 2.104 μs | 2.196 μs | 2.225 μs | 1.08 | 0.05 | 1 | 0.5264 | 0.0153 | 8.65 KB | 1.00 |
| AgileMapper | 2.766 μs | 0.4826 μs | 0.0265 μs | 2.736 μs | 2.781 μs | 2.781 μs | 1.37 | 0.06 | 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 | 6.375 μs | 1.5930 μs | 0.0873 μs | 6.276 μs | 6.409 μs | 6.440 μs | 1.00 | 0.02 | 1 | 1.6708 | 0.0916 | 27.4 KB | 1.00 |
| EggMapper | 7.468 μs | 1.4490 μs | 0.0794 μs | 7.376 μs | 7.512 μs | 7.516 μs | 1.17 | 0.02 | 1 | 1.6708 | 0.0916 | 27.4 KB | 1.00 |
| AutoMapper | 7.709 μs | 2.4363 μs | 0.1335 μs | 7.614 μs | 7.651 μs | 7.861 μs | 1.21 | 0.02 | 1 | 1.7548 | 0.1068 | 28.7 KB | 1.05 |
| Mapster | 7.243 μs | 1.6157 μs | 0.0886 μs | 7.143 μs | 7.276 μs | 7.310 μs | 1.14 | 0.02 | 1 | 1.6708 | 0.0916 | 27.4 KB | 1.00 |
| MapperlyMap | 6.260 μs | 2.2466 μs | 0.1231 μs | 6.124 μs | 6.293 μs | 6.364 μs | 0.98 | 0.02 | 1 | 1.6785 | 0.0992 | 27.42 KB | 1.00 |
| AgileMapper | 6.380 μs | 0.2886 μs | 0.0158 μs | 6.366 μs | 6.378 μs | 6.397 μs | 1.00 | 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 | 20.23 μs | 4.400 μs | 0.241 μs | 20.01 μs | 20.18 μs | 20.49 μs | 1.00 | 0.01 | 1 | 5.2490 | 1.3123 | 85.99 KB | 1.00 |
| EggMapper | 21.28 μs | 8.156 μs | 0.447 μs | 20.82 μs | 21.31 μs | 21.71 μs | 1.05 | 0.02 | 1 | 5.2490 | 1.3123 | 85.99 KB | 1.00 |
| AutoMapper | 25.65 μs | 3.923 μs | 0.215 μs | 25.52 μs | 25.54 μs | 25.90 μs | 1.27 | 0.02 | 1 | 5.7678 | 1.4343 | 94.34 KB | 1.10 |
| Mapster | 21.47 μs | 8.505 μs | 0.466 μs | 20.94 μs | 21.65 μs | 21.82 μs | 1.06 | 0.02 | 1 | 5.2490 | 1.3123 | 85.99 KB | 1.00 |
| MapperlyMap | 22.10 μs | 1.357 μs | 0.074 μs | 22.03 μs | 22.08 μs | 22.18 μs | 1.09 | 0.01 | 1 | 5.2490 | 1.2817 | 86.02 KB | 1.00 |
| AgileMapper | 23.67 μs | 1.383 μs | 0.076 μs | 23.59 μs | 23.69 μs | 23.74 μs | 1.17 | 0.01 | 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,351.579 μs | 1,541.394 μs | 84.4890 μs | 1,298.326 μs | 1,307.413 μs | 1,448.997 μs | 1.003 | 0.08 | 3 | 3.9063 | 1.9531 | 95.16 KB | 1.00 |
| AutoMapperStartup | 438.191 μs | 1,338.267 μs | 73.3549 μs | 392.204 μs | 399.583 μs | 522.787 μs | 0.325 | 0.05 | 2 | 5.8594 | - | 104.11 KB | 1.09 |
| MapsterStartup | 2.544 μs | 1.377 μs | 0.0755 μs | 2.473 μs | 2.537 μs | 2.623 μ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.349 ms | 1.191 ms | 0.0653 ms | 1.293 ms | 1.333 ms | 1.420 ms | 1.00 | 0.06 | 1 | 5.8594 | 3.9063 | 96.22 KB | 1.00 |
| AutoMapper | 4.329 ms | 10.067 ms | 0.5518 ms | 3.856 ms | 4.195 ms | 4.935 ms | 3.21 | 0.38 | 2 | 15.6250 | 7.8125 | 310.19 KB | 3.22 |
| Mapster | 4.484 ms | 6.025 ms | 0.3302 ms | 4.108 ms | 4.617 ms | 4.727 ms | 3.33 | 0.25 | 2 | 39.0625 | 15.6250 | 758.46 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 #176.