chore: update benchmark results in README - #131
Open
cloud-hai-vo wants to merge 1 commit into
Open
cloud-hai-vo wants to merge 1 commit into
cloud-hai-vo wants to merge 1 commit into
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.977 μs | 0.7503 μs | 0.0411 μs | 1.937 μs | 1.976 μs | 2.019 μs | 1.00 | 0.03 | 1 | 0.5264 | 0.0153 | 8.65 KB | 1.00 |
| EggMapper | 1.922 μs | 0.5421 μs | 0.0297 μs | 1.888 μs | 1.939 μs | 1.940 μs | 0.97 | 0.02 | 1 | 0.5264 | 0.0153 | 8.65 KB | 1.00 |
| AutoMapper | 2.631 μs | 0.5449 μs | 0.0299 μs | 2.598 μs | 2.639 μs | 2.656 μs | 1.33 | 0.03 | 2 | 0.6065 | 0.0191 | 9.95 KB | 1.15 |
| Mapster | 1.925 μs | 0.7211 μs | 0.0395 μs | 1.880 μs | 1.940 μs | 1.955 μs | 0.97 | 0.02 | 1 | 0.5264 | 0.0153 | 8.65 KB | 1.00 |
| MapperlyMap | 1.883 μs | 0.8752 μs | 0.0480 μs | 1.830 μs | 1.896 μs | 1.924 μs | 0.95 | 0.03 | 1 | 0.5264 | 0.0153 | 8.65 KB | 1.00 |
| AgileMapper | 2.644 μs | 0.7701 μs | 0.0422 μs | 2.607 μs | 2.635 μs | 2.690 μs | 1.34 | 0.03 | 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.267 μs | 1.842 μs | 0.1010 μs | 5.189 μs | 5.231 μs | 5.381 μs | 1.00 | 0.02 | 1 | 1.6708 | 0.0916 | 27.4 KB | 1.00 |
| EggMapper | 5.771 μs | 1.983 μs | 0.1087 μs | 5.677 μs | 5.745 μs | 5.890 μs | 1.10 | 0.03 | 1 | 1.6708 | 0.0916 | 27.4 KB | 1.00 |
| AutoMapper | 6.471 μs | 2.923 μs | 0.1602 μs | 6.348 μs | 6.413 μs | 6.652 μs | 1.23 | 0.03 | 1 | 1.7548 | 0.1068 | 28.7 KB | 1.05 |
| Mapster | 6.057 μs | 3.299 μs | 0.1808 μs | 5.913 μs | 5.998 μs | 6.260 μs | 1.15 | 0.04 | 1 | 1.6708 | 0.0916 | 27.4 KB | 1.00 |
| MapperlyMap | 5.493 μs | 1.839 μs | 0.1008 μs | 5.378 μs | 5.536 μs | 5.565 μs | 1.04 | 0.02 | 1 | 1.6785 | 0.0992 | 27.42 KB | 1.00 |
| AgileMapper | 5.295 μs | 1.790 μs | 0.0981 μs | 5.182 μs | 5.346 μs | 5.357 μs | 1.01 | 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 | 18.08 μs | 4.284 μs | 0.235 μs | 17.81 μs | 18.18 μs | 18.24 μs | 1.00 | 0.02 | 1 | 5.2490 | 1.3123 | 85.99 KB | 1.00 |
| EggMapper | 18.02 μs | 3.970 μs | 0.218 μs | 17.89 μs | 17.90 μs | 18.27 μs | 1.00 | 0.02 | 1 | 5.2490 | 1.3123 | 85.99 KB | 1.00 |
| AutoMapper | 22.61 μs | 1.543 μs | 0.085 μs | 22.52 μs | 22.62 μs | 22.69 μs | 1.25 | 0.01 | 1 | 5.7678 | 1.4343 | 94.34 KB | 1.10 |
| Mapster | 18.18 μs | 4.120 μs | 0.226 μs | 18.02 μs | 18.08 μs | 18.44 μs | 1.01 | 0.02 | 1 | 5.2490 | 1.3123 | 85.99 KB | 1.00 |
| MapperlyMap | 19.48 μs | 1.796 μs | 0.098 μs | 19.42 μs | 19.43 μs | 19.60 μs | 1.08 | 0.01 | 1 | 5.2490 | 1.2817 | 86.02 KB | 1.00 |
| AgileMapper | 21.59 μs | 1.451 μs | 0.080 μs | 21.52 μs | 21.56 μs | 21.68 μs | 1.19 | 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,348.096 μs | 2,379.9983 μs | 130.4557 μs | 1,198.142 μs | 1,410.658 μs | 1,435.487 μs | 1.007 | 0.12 | 3 | 5.8594 | 3.9063 | 96.08 KB | 1.00 |
| AutoMapperStartup | 463.848 μs | 924.8130 μs | 50.6921 μs | 419.940 μs | 452.280 μs | 519.325 μs | 0.346 | 0.04 | 2 | 5.8594 | - | 104.04 KB | 1.08 |
| MapsterStartup | 2.630 μs | 0.5154 μs | 0.0282 μs | 2.598 μs | 2.639 μs | 2.653 μ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.335 ms | 1.579 ms | 0.0865 ms | 1.264 ms | 1.309 ms | 1.431 ms | 1.00 | 0.08 | 1 | 5.8594 | 3.9063 | 96 KB | 1.00 |
| AutoMapper | 4.056 ms | 10.513 ms | 0.5763 ms | 3.490 ms | 4.036 ms | 4.642 ms | 3.05 | 0.41 | 2 | 15.6250 | 7.8125 | 310.47 KB | 3.23 |
| Mapster | 4.374 ms | 10.211 ms | 0.5597 ms | 3.746 ms | 4.555 ms | 4.821 ms | 3.29 | 0.41 | 2 | 39.0625 | 15.6250 | 757.68 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 #193.