Skip to content

Commit af01c08

Browse files
committed
Improved benchmark
1 parent 5ff9e96 commit af01c08

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

ValueMapper/Benchmark/MapperComparisonBenchmarks.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public void Setup()
3333
Flags = new[] { "Flag1", "Flag2", "Flag3" }
3434
};
3535

36-
_testCollection = Enumerable.Range(1, 1000)
36+
_testCollection = Enumerable.Range(1, 100000)
3737
.Select(i => new TestSource
3838
{
3939
Id = i,

ValueMapper/Benchmark/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ private static void QuickBenchmark()
5151
// Run each benchmark manually with a stopwatch
5252
RunQuickBenchmark("Simple property mapping (1 object)", () => benchmark.MapSimpleObject());
5353
RunQuickBenchmark("Complex property mapping (1 object)", () => benchmark.MapComplexObject());
54-
RunQuickBenchmark("Collection mapping (100 objects)", () => benchmark.MapCollection(100));
5554
RunQuickBenchmark("Collection mapping (1,000 objects)", () => benchmark.MapCollection(1000));
5655
RunQuickBenchmark("Collection mapping (10,000 objects)", () => benchmark.MapCollection(10000));
57-
RunQuickBenchmark("Collection mapping parallel (10,000 objects)", () => benchmark.MapCollectionParallel(10000));
56+
RunQuickBenchmark("Collection mapping (100,000 objects)", () => benchmark.MapCollection(100000));
57+
RunQuickBenchmark("Collection mapping parallel (100,000 objects)", () => benchmark.MapCollectionParallel(100000));
5858
RunQuickBenchmark("Type conversion benchmark", () => benchmark.MapWithTypeConversions());
5959
RunQuickBenchmark("Custom property mapping", () => benchmark.MapWithCustomPropertyNames());
6060

@@ -93,7 +93,7 @@ private static void QuickComparisonBenchmark()
9393
RunQuickBenchmark("Mapster", () => benchmark.Mapster());
9494
RunQuickBenchmark("ManuallyImplementedMapper", () => benchmark.ManuallyImplementedMapper());
9595

96-
Console.WriteLine("\nCollection mapping (1000 items):");
96+
Console.WriteLine("\nCollection mapping (100000 items):");
9797
Console.WriteLine("===============================");
9898
RunQuickBenchmark("ValueMapperCollection", () => benchmark.ValueMapperCollection());
9999
RunQuickBenchmark("AutoMapperCollection", () => benchmark.AutoMapperCollection());

0 commit comments

Comments
 (0)