chore: update benchmark results in README#126
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 | 2.025 μs | 1.2151 μs | 0.0666 μs | 1.971 μs | 2.006 μs | 2.100 μs | 1.00 | 0.04 | 1 | 0.5264 | 0.0153 | 8.65 KB | 1.00 |
| EggMapper | 2.150 μs | 1.5231 μs | 0.0835 μs | 2.061 μs | 2.164 μs | 2.226 μs | 1.06 | 0.05 | 1 | 0.5264 | 0.0153 | 8.65 KB | 1.00 |
| AutoMapper | 2.553 μs | 0.8315 μs | 0.0456 μs | 2.504 μs | 2.559 μs | 2.594 μs | 1.26 | 0.04 | 1 | 0.6065 | 0.0191 | 9.95 KB | 1.15 |
| Mapster | 2.046 μs | 0.6996 μs | 0.0383 μs | 2.007 μs | 2.047 μs | 2.084 μs | 1.01 | 0.03 | 1 | 0.5264 | 0.0153 | 8.65 KB | 1.00 |
| MapperlyMap | 2.240 μs | 0.5902 μs | 0.0323 μs | 2.204 μs | 2.248 μs | 2.267 μs | 1.11 | 0.03 | 1 | 0.5264 | 0.0153 | 8.65 KB | 1.00 |
| AgileMapper | 3.084 μs | 0.2639 μs | 0.0145 μs | 3.069 μs | 3.085 μs | 3.098 μs | 1.52 | 0.04 | 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 | 6.297 μs | 0.8301 μs | 0.0455 μs | 6.252 μs | 6.296 μs | 6.343 μs | 1.00 | 0.01 | 1 | 1.6708 | 0.0916 | 27.4 KB | 1.00 |
| EggMapper | 7.077 μs | 2.5824 μs | 0.1416 μs | 6.925 μs | 7.102 μs | 7.205 μs | 1.12 | 0.02 | 1 | 1.6708 | 0.0916 | 27.4 KB | 1.00 |
| AutoMapper | 8.146 μs | 1.6843 μs | 0.0923 μs | 8.041 μs | 8.182 μs | 8.215 μs | 1.29 | 0.02 | 1 | 1.7548 | 0.1068 | 28.7 KB | 1.05 |
| Mapster | 7.520 μs | 2.2581 μs | 0.1238 μs | 7.412 μs | 7.494 μs | 7.655 μs | 1.19 | 0.02 | 1 | 1.6632 | 0.0916 | 27.4 KB | 1.00 |
| MapperlyMap | 7.259 μs | 0.9384 μs | 0.0514 μs | 7.212 μs | 7.251 μs | 7.314 μs | 1.15 | 0.01 | 1 | 1.6785 | 0.0992 | 27.42 KB | 1.00 |
| AgileMapper | 5.974 μs | 3.8573 μs | 0.2114 μs | 5.742 μs | 6.025 μs | 6.156 μs | 0.95 | 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 | 25.61 μs | 9.753 μs | 0.535 μs | 25.20 μs | 25.41 μs | 26.22 μs | 1.00 | 0.03 | 1 | 5.2490 | 1.3123 | 85.99 KB | 1.00 |
| EggMapper | 23.49 μs | 10.610 μs | 0.582 μs | 22.84 μs | 23.68 μs | 23.96 μs | 0.92 | 0.03 | 1 | 5.2490 | 1.3123 | 85.99 KB | 1.00 |
| AutoMapper | 27.36 μs | 14.618 μs | 0.801 μs | 26.44 μs | 27.73 μs | 27.90 μs | 1.07 | 0.03 | 1 | 5.7678 | 1.4343 | 94.34 KB | 1.10 |
| Mapster | 22.91 μs | 3.016 μs | 0.165 μs | 22.75 μs | 22.91 μs | 23.08 μs | 0.89 | 0.02 | 1 | 5.2490 | 1.3123 | 85.99 KB | 1.00 |
| MapperlyMap | 23.58 μs | 6.089 μs | 0.334 μs | 23.33 μs | 23.47 μs | 23.96 μs | 0.92 | 0.02 | 1 | 5.2490 | 1.2817 | 86.02 KB | 1.00 |
| AgileMapper | 25.72 μs | 6.206 μs | 0.340 μs | 25.47 μs | 25.58 μs | 26.10 μs | 1.00 | 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,407.678 μs | 2,410.364 μs | 132.1202 μs | 1,256.128 μs | 1,468.287 μs | 1,498.620 μs | 1.006 | 0.12 | 3 | 3.9063 | 1.9531 | 95.18 KB | 1.00 |
| AutoMapperStartup | 408.211 μs | 692.071 μs | 37.9347 μs | 371.559 μs | 405.763 μs | 447.310 μs | 0.292 | 0.03 | 2 | 5.8594 | - | 104.67 KB | 1.10 |
| MapsterStartup | 3.123 μs | 2.608 μs | 0.1430 μs | 3.013 μs | 3.072 μs | 3.285 μ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.358 ms | 1.771 ms | 0.0971 ms | 1.246 ms | 1.405 ms | 1.422 ms | 1.00 | 0.09 | 1 | 3.9063 | 1.9531 | 95.39 KB | 1.00 |
| AutoMapper | 4.185 ms | 11.009 ms | 0.6034 ms | 3.587 ms | 4.175 ms | 4.794 ms | 3.09 | 0.44 | 2 | 15.6250 | 7.8125 | 310.28 KB | 3.25 |
| Mapster | 4.411 ms | 8.539 ms | 0.4680 ms | 3.874 ms | 4.626 ms | 4.733 ms | 3.26 | 0.37 | 2 | 46.8750 | 15.6250 | 765.62 KB | 8.03 |
📝 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 #183.