chore: update benchmark results in README#127
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 | 1.912 μs | 1.0027 μs | 0.0550 μs | 1.863 μs | 1.903 μs | 1.971 μs | 1.00 | 0.04 | 1 | 0.5283 | 0.0172 | 8.65 KB | 1.00 |
| EggMapper | 1.840 μs | 0.7015 μs | 0.0385 μs | 1.814 μs | 1.821 μs | 1.884 μs | 0.96 | 0.03 | 1 | 0.5283 | 0.0172 | 8.65 KB | 1.00 |
| AutoMapper | 2.485 μs | 1.3098 μs | 0.0718 μs | 2.414 μs | 2.484 μs | 2.557 μs | 1.30 | 0.05 | 2 | 0.6065 | 0.0191 | 9.95 KB | 1.15 |
| Mapster | 1.870 μs | 0.7057 μs | 0.0387 μs | 1.826 μs | 1.890 μs | 1.895 μs | 0.98 | 0.03 | 1 | 0.5283 | 0.0172 | 8.65 KB | 1.00 |
| MapperlyMap | 1.874 μs | 0.8853 μs | 0.0485 μs | 1.818 μs | 1.893 μs | 1.909 μs | 0.98 | 0.03 | 1 | 0.5283 | 0.0172 | 8.65 KB | 1.00 |
| AgileMapper | 2.695 μs | 1.0504 μs | 0.0576 μs | 2.661 μs | 2.663 μs | 2.762 μs | 1.41 | 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 | 5.322 μs | 1.2928 μs | 0.0709 μs | 5.254 μs | 5.316 μs | 5.395 μs | 1.00 | 0.02 | 1 | 1.6708 | 0.0916 | 27.4 KB | 1.00 |
| EggMapper | 5.844 μs | 1.3005 μs | 0.0713 μs | 5.770 μs | 5.850 μs | 5.912 μs | 1.10 | 0.02 | 1 | 1.6708 | 0.0916 | 27.4 KB | 1.00 |
| AutoMapper | 6.803 μs | 0.9968 μs | 0.0546 μs | 6.741 μs | 6.824 μs | 6.844 μs | 1.28 | 0.02 | 1 | 1.7548 | 0.1068 | 28.7 KB | 1.05 |
| Mapster | 5.908 μs | 2.0751 μs | 0.1137 μs | 5.837 μs | 5.848 μs | 6.039 μs | 1.11 | 0.02 | 1 | 1.6708 | 0.0916 | 27.4 KB | 1.00 |
| MapperlyMap | 5.618 μs | 2.3189 μs | 0.1271 μs | 5.504 μs | 5.595 μs | 5.755 μs | 1.06 | 0.02 | 1 | 1.6785 | 0.0992 | 27.42 KB | 1.00 |
| AgileMapper | 5.472 μs | 1.7412 μs | 0.0954 μs | 5.375 μs | 5.475 μs | 5.566 μs | 1.03 | 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.46 μs | 1.509 μs | 0.083 μs | 17.41 μs | 17.41 μs | 17.55 μs | 1.00 | 0.01 | 1 | 5.2490 | 1.3123 | 85.99 KB | 1.00 |
| EggMapper | 18.19 μs | 7.941 μs | 0.435 μs | 17.68 μs | 18.41 μs | 18.47 μs | 1.04 | 0.02 | 1 | 5.2490 | 1.3123 | 85.99 KB | 1.00 |
| AutoMapper | 21.80 μs | 7.687 μs | 0.421 μs | 21.49 μs | 21.64 μs | 22.28 μs | 1.25 | 0.02 | 1 | 5.7678 | 1.4343 | 94.34 KB | 1.10 |
| Mapster | 18.36 μs | 1.896 μs | 0.104 μs | 18.26 μs | 18.35 μs | 18.47 μs | 1.05 | 0.01 | 1 | 5.2490 | 1.3123 | 85.99 KB | 1.00 |
| MapperlyMap | 19.86 μs | 5.767 μs | 0.316 μs | 19.59 μs | 19.78 μs | 20.20 μs | 1.14 | 0.02 | 1 | 5.2490 | 1.2817 | 86.02 KB | 1.00 |
| AgileMapper | 21.20 μs | 11.870 μs | 0.651 μs | 20.48 μs | 21.38 μs | 21.75 μs | 1.21 | 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,349.001 μs | 1,544.8481 μs | 84.6783 μs | 1,268.218 μs | 1,341.687 μs | 1,437.100 μs | 1.003 | 0.08 | 3 | 5.8594 | 3.9063 | 95.98 KB | 1.00 |
| AutoMapperStartup | 442.545 μs | 409.6929 μs | 22.4567 μs | 424.385 μs | 435.594 μs | 467.655 μs | 0.329 | 0.02 | 2 | 5.8594 | - | 104.11 KB | 1.08 |
| MapsterStartup | 2.693 μs | 0.9548 μs | 0.0523 μs | 2.632 μs | 2.717 μs | 2.728 μ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.327 ms | 1.510 ms | 0.0828 ms | 1.267 ms | 1.292 ms | 1.421 ms | 1.00 | 0.08 | 1 | 5.8594 | 3.9063 | 95.99 KB | 1.00 |
| AutoMapper | 4.225 ms | 9.960 ms | 0.5459 ms | 3.644 ms | 4.303 ms | 4.727 ms | 3.19 | 0.39 | 2 | 15.6250 | 7.8125 | 310.23 KB | 3.23 |
| Mapster | 4.379 ms | 11.612 ms | 0.6365 ms | 3.669 ms | 4.572 ms | 4.897 ms | 3.31 | 0.45 | 2 | 39.0625 | 15.6250 | 756.58 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 #186.