From 2def014a95bb609fa45857c9bf75db64d6d4fb5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=A4gi?= Date: Sun, 4 Feb 2024 09:07:45 +0100 Subject: [PATCH] Run bencjmarks on n2. --- .../Quantities.Benchmark/AddingQuantities.cs | 22 +++++----- .../AllocationFreeBenchmark.cs | 18 ++++---- .../ConversionBenchmarks.cs | 20 ++++----- .../ConvertingQuantities.cs | 16 +++---- .../Quantities.Benchmark/CreateQuantities.cs | 34 +++++++------- .../DeserializationBenchmark.cs | 22 +++++----- .../DividingQuantities.cs | 28 ++++++------ .../Quantities.Benchmark/MeasureBenchmark.cs | 14 +++--- .../MultiplyingQuantities.cs | 26 +++++------ .../Numerics/AlgorithmsPowerBenchmark.cs | 24 +++++----- .../Numerics/PolynomialBenchmark.cs | 14 +++--- .../PolynomialExponentiationBenchmark.cs | 44 +++++++++---------- .../PolynomialMultiplicationBenchmark.cs | 20 ++++----- .../PrefixScalingBenchmarks.cs | 26 +++++------ .../SerializationComparisonBenchmark.cs | 12 ++--- 15 files changed, 170 insertions(+), 170 deletions(-) diff --git a/source/Quantities.Benchmark/AddingQuantities.cs b/source/Quantities.Benchmark/AddingQuantities.cs index 103f106d..3970ecfe 100644 --- a/source/Quantities.Benchmark/AddingQuantities.cs +++ b/source/Quantities.Benchmark/AddingQuantities.cs @@ -34,18 +34,18 @@ public class AddingQuantities /* Summary * -BenchmarkDotNet v0.13.12, Arch Linux -Intel Core i7-8565U CPU 1.80GHz (Whiskey Lake), 1 CPU, 8 logical and 4 physical cores +BenchmarkDotNet v0.13.12, Arch Linux ARM +Unknown processor .NET SDK 8.0.101 - [Host] : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 - DefaultJob : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 + [Host] : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD + DefaultJob : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD -| Method | Mean | Error | Ratio | Allocated | Alloc Ratio | -|------------ |----------:|----------:|------:|----------:|------------:| -| Trivial | 1.4356 ns | 0.0099 ns | 1.00 | - | NA | -| AddSi | 2.5235 ns | 0.0457 ns | 1.76 | - | NA | -| AddSiSame | 0.7922 ns | 0.0380 ns | 0.55 | - | NA | -| AddImperial | 2.5333 ns | 0.0040 ns | 1.76 | - | NA | -| AddMixed | 2.4236 ns | 0.0125 ns | 1.69 | - | NA | +| Method | Mean | Error | Ratio | Allocated | Alloc Ratio | +|------------ |---------:|----------:|------:|----------:|------------:| +| Trivial | 2.927 ns | 0.0070 ns | 1.00 | - | NA | +| AddSi | 7.345 ns | 0.0023 ns | 2.51 | - | NA | +| AddSiSame | 2.787 ns | 0.0022 ns | 0.95 | - | NA | +| AddImperial | 7.487 ns | 0.0020 ns | 2.56 | - | NA | +| AddMixed | 7.891 ns | 0.0038 ns | 2.70 | - | NA | */ diff --git a/source/Quantities.Benchmark/AllocationFreeBenchmark.cs b/source/Quantities.Benchmark/AllocationFreeBenchmark.cs index 0952e090..c65ce243 100644 --- a/source/Quantities.Benchmark/AllocationFreeBenchmark.cs +++ b/source/Quantities.Benchmark/AllocationFreeBenchmark.cs @@ -33,16 +33,16 @@ public class AllocationFreeBenchmark /* Summary * -BenchmarkDotNet v0.13.12, Arch Linux -Intel Core i7-8565U CPU 1.80GHz (Whiskey Lake), 1 CPU, 8 logical and 4 physical cores +BenchmarkDotNet v0.13.12, Arch Linux ARM +Unknown processor .NET SDK 8.0.101 - [Host] : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 - DefaultJob : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 + [Host] : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD + DefaultJob : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD -| Method | Mean | Error | Ratio | Allocated | Alloc Ratio | -|---------------------- |----------:|----------:|------:|----------:|------------:| -| Constructor | 6.1954 ns | 0.0133 ns | 1.00 | 24 B | 1.00 | -| AllocationFree | 0.5308 ns | 0.0033 ns | 0.09 | - | 0.00 | -| AllocationFreeFactory | 0.5394 ns | 0.0101 ns | 0.09 | - | 0.00 | +| Method | Mean | Error | Ratio | Allocated | Alloc Ratio | +|---------------------- |-----------:|----------:|------:|----------:|------------:| +| Constructor | 14.7488 ns | 0.0076 ns | 1.00 | 24 B | 1.00 | +| AllocationFree | 0.2513 ns | 0.0135 ns | 0.02 | - | 0.00 | +| AllocationFreeFactory | 0.4629 ns | 0.0393 ns | 0.03 | - | 0.00 | */ diff --git a/source/Quantities.Benchmark/ConversionBenchmarks.cs b/source/Quantities.Benchmark/ConversionBenchmarks.cs index 5559f783..feb220d5 100644 --- a/source/Quantities.Benchmark/ConversionBenchmarks.cs +++ b/source/Quantities.Benchmark/ConversionBenchmarks.cs @@ -53,17 +53,17 @@ file static class Cache /* Summary * -BenchmarkDotNet v0.13.12, Arch Linux -Intel Core i7-8565U CPU 1.80GHz (Whiskey Lake), 1 CPU, 8 logical and 4 physical cores +BenchmarkDotNet v0.13.12, Arch Linux ARM +Unknown processor .NET SDK 8.0.101 - [Host] : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 - DefaultJob : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 + [Host] : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD + DefaultJob : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD -| Method | Mean | Error | Ratio | -|----------------------- |----------:|----------:|------:|- -| EvaluateTrivial | 2.5300 ns | 0.0105 ns | 1.00 | -| EvaluateSuccessive | 0.8875 ns | 0.0371 ns | 0.35 | -| EvaluateCached | 1.5962 ns | 0.0495 ns | 0.63 | -| EvaluateArithmetically | 0.3239 ns | 0.0068 ns | 0.13 | +| Method | Mean | Error | Ratio | +|----------------------- |----------:|----------:|------:| +| EvaluateTrivial | 22.265 ns | 0.0010 ns | 1.00 | +| EvaluateSuccessive | 9.437 ns | 0.0009 ns | 0.42 | +| EvaluateCached | 3.335 ns | 0.0006 ns | 0.15 | +| EvaluateArithmetically | 1.272 ns | 0.0047 ns | 0.06 | */ diff --git a/source/Quantities.Benchmark/ConvertingQuantities.cs b/source/Quantities.Benchmark/ConvertingQuantities.cs index 94b3cabb..50b5be09 100644 --- a/source/Quantities.Benchmark/ConvertingQuantities.cs +++ b/source/Quantities.Benchmark/ConvertingQuantities.cs @@ -29,17 +29,17 @@ public class ConvertingQuantities /* Summary * -BenchmarkDotNet v0.13.12, Arch Linux -Intel Core i7-8565U CPU 1.80GHz (Whiskey Lake), 1 CPU, 8 logical and 4 physical cores +BenchmarkDotNet v0.13.12, Arch Linux ARM +Unknown processor .NET SDK 8.0.101 - [Host] : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 - DefaultJob : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 + [Host] : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD + DefaultJob : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD | Method | Mean | Error | Ratio | Allocated | Alloc Ratio | |------------------------ |----------:|----------:|------:|----------:|------------:| -| TrivialImplementation | 2.166 ns | 0.0055 ns | 1.00 | - | NA | -| QuantityImplementation | 3.457 ns | 0.0984 ns | 1.60 | - | NA | -| QuantityToSame | 14.680 ns | 0.0500 ns | 6.78 | - | NA | -| QuantityToVeryDifferent | 15.641 ns | 0.0234 ns | 7.22 | - | NA | +| TrivialImplementation | 1.877 ns | 0.0070 ns | 1.00 | - | NA | +| QuantityImplementation | 7.577 ns | 0.0014 ns | 4.04 | - | NA | +| QuantityToSame | 58.988 ns | 0.0083 ns | 31.40 | - | NA | +| QuantityToVeryDifferent | 58.854 ns | 0.0111 ns | 31.36 | - | NA | */ diff --git a/source/Quantities.Benchmark/CreateQuantities.cs b/source/Quantities.Benchmark/CreateQuantities.cs index 787ced1c..932a922e 100644 --- a/source/Quantities.Benchmark/CreateQuantities.cs +++ b/source/Quantities.Benchmark/CreateQuantities.cs @@ -70,22 +70,22 @@ public class CreateQuantities /* Summary * -BenchmarkDotNet v0.13.12, Arch Linux -Intel Core i7-8565U CPU 1.80GHz (Whiskey Lake), 1 CPU, 8 logical and 4 physical cores +BenchmarkDotNet v0.13.12, Arch Linux ARM +Unknown processor .NET SDK 8.0.101 - [Host] : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 - DefaultJob : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 - - -| Method | Mean | Error | Ratio | Allocated | Alloc Ratio | -|------------------------------- |-----------:|----------:|------:|----------:|------------:| -| CreateObject | 6.4661 ns | 0.0478 ns | 1.00 | 24 B | 1.00 | -| CreateStruct | 1.1826 ns | 0.0065 ns | 0.18 | - | 0.00 | -| CreateScalarQuantity | 0.8521 ns | 0.0069 ns | 0.13 | - | 0.00 | -| CreateScalarQuantityWithoutOpt | 3.4100 ns | 0.0053 ns | 0.53 | - | 0.00 | -| CreateQuotientQuantity | 13.4490 ns | 0.2649 ns | 2.08 | - | 0.00 | -| CreateProductQuantity | 14.4045 ns | 0.0578 ns | 2.23 | - | 0.00 | -| CreateCachedProductQuantity | 1.1532 ns | 0.0111 ns | 0.18 | - | 0.00 | -| CreateScalarPowerQuantity | 10.5036 ns | 0.0530 ns | 1.63 | - | 0.00 | -| CreateSquarePowerQuantity | 1.0484 ns | 0.0153 ns | 0.16 | - | 0.00 | + [Host] : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD + DefaultJob : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD + + +| Method | Mean | Error | Ratio | Allocated | Alloc Ratio | +|------------------------------- |----------:|----------:|------:|----------:|------------:| +| CreateObject | 14.663 ns | 0.0070 ns | 1.00 | 24 B | 1.00 | +| CreateStruct | 1.990 ns | 0.0070 ns | 0.14 | - | 0.00 | +| CreateScalarQuantity | 3.292 ns | 0.0059 ns | 0.22 | - | 0.00 | +| CreateScalarQuantityWithoutOpt | 15.668 ns | 0.0069 ns | 1.07 | - | 0.00 | +| CreateQuotientQuantity | 59.082 ns | 0.0262 ns | 4.03 | - | 0.00 | +| CreateProductQuantity | 59.846 ns | 0.0563 ns | 4.08 | - | 0.00 | +| CreateCachedProductQuantity | 4.865 ns | 0.0061 ns | 0.33 | - | 0.00 | +| CreateScalarPowerQuantity | 52.496 ns | 0.0136 ns | 3.58 | - | 0.00 | +| CreateSquarePowerQuantity | 3.181 ns | 0.0116 ns | 0.22 | - | 0.00 | */ diff --git a/source/Quantities.Benchmark/DeserializationBenchmark.cs b/source/Quantities.Benchmark/DeserializationBenchmark.cs index 6d107221..c4d214b6 100644 --- a/source/Quantities.Benchmark/DeserializationBenchmark.cs +++ b/source/Quantities.Benchmark/DeserializationBenchmark.cs @@ -36,20 +36,20 @@ public class DeserializationBenchmark /* Summary * -BenchmarkDotNet v0.13.12, Arch Linux -Intel Core i7-8565U CPU 1.80GHz (Whiskey Lake), 1 CPU, 8 logical and 4 physical cores +BenchmarkDotNet v0.13.12, Arch Linux ARM +Unknown processor .NET SDK 8.0.101 - [Host] : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 - DefaultJob : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 + [Host] : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD + DefaultJob : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD | Method | Mean | Error | Ratio | Allocated | Alloc Ratio | |----------------------- |-----------:|--------:|------:|----------:|------------:| -| SystemTriple | 171.0 ns | 1.79 ns | 1.00 | 40 B | 1.00 | -| SystemQuantity | 596.6 ns | 2.06 ns | 3.49 | 160 B | 4.00 | -| PrefixedQuantity | 686.7 ns | 0.76 ns | 4.02 | 224 B | 5.60 | -| FractionalQuantity | 1,362.4 ns | 3.68 ns | 7.97 | 744 B | 18.60 | -| MultiplicativeQuantity | 1,319.7 ns | 4.03 ns | 7.72 | 744 B | 18.60 | -| PowerQuantity | 1,125.8 ns | 2.42 ns | 6.59 | 592 B | 14.80 | -| ScalarPowerQuantity | 788.2 ns | 1.79 ns | 4.61 | 232 B | 5.80 | +| SystemTriple | 499.8 ns | 0.13 ns | 1.00 | 40 B | 1.00 | +| SystemQuantity | 1,895.6 ns | 0.35 ns | 3.79 | 160 B | 4.00 | +| PrefixedQuantity | 2,296.8 ns | 0.66 ns | 4.60 | 224 B | 5.60 | +| FractionalQuantity | 4,701.7 ns | 2.45 ns | 9.41 | 745 B | 18.62 | +| MultiplicativeQuantity | 4,645.9 ns | 3.76 ns | 9.29 | 745 B | 18.62 | +| PowerQuantity | 3,840.3 ns | 1.35 ns | 7.68 | 592 B | 14.80 | +| ScalarPowerQuantity | 2,504.2 ns | 0.54 ns | 5.01 | 232 B | 5.80 | */ diff --git a/source/Quantities.Benchmark/DividingQuantities.cs b/source/Quantities.Benchmark/DividingQuantities.cs index a8863f3a..bc2d9f78 100644 --- a/source/Quantities.Benchmark/DividingQuantities.cs +++ b/source/Quantities.Benchmark/DividingQuantities.cs @@ -43,19 +43,19 @@ public class DividingQuantities /* Summary * -BenchmarkDotNet v0.13.12, Arch Linux -Intel Core i7-8565U CPU 1.80GHz (Whiskey Lake), 1 CPU, 8 logical and 4 physical cores +BenchmarkDotNet v0.13.12, Arch Linux ARM +Unknown processor .NET SDK 8.0.101 - [Host] : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 - DefaultJob : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 - - -| Method | Mean | Error | Ratio | Allocated | Alloc Ratio | -|--------------- |----------:|----------:|------:|----------:|------------:| -| Trivial | 16.622 ns | 0.0110 ns | 1.00 | - | NA | -| DivideSi | 6.519 ns | 0.0158 ns | 0.39 | - | NA | -| DivideImperial | 6.430 ns | 0.0180 ns | 0.39 | - | NA | -| DivideMixed | 7.376 ns | 0.0083 ns | 0.44 | - | NA | -| DivideAliased | 6.554 ns | 0.0048 ns | 0.39 | - | NA | -| DividePureSi | 6.033 ns | 0.0072 ns | 0.36 | - | NA | + [Host] : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD + DefaultJob : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD + + +| Method | Mean | Error | Ratio | Allocated | Alloc Ratio | +|--------------- |---------:|---------:|------:|----------:|------------:| +| Trivial | 70.64 ns | 0.034 ns | 1.00 | - | NA | +| DivideSi | 29.76 ns | 0.003 ns | 0.42 | - | NA | +| DivideImperial | 29.74 ns | 0.003 ns | 0.42 | - | NA | +| DivideMixed | 29.74 ns | 0.001 ns | 0.42 | - | NA | +| DivideAliased | 29.75 ns | 0.002 ns | 0.42 | - | NA | +| DividePureSi | 29.74 ns | 0.002 ns | 0.42 | - | NA | */ diff --git a/source/Quantities.Benchmark/MeasureBenchmark.cs b/source/Quantities.Benchmark/MeasureBenchmark.cs index d4355caa..9d851bd3 100644 --- a/source/Quantities.Benchmark/MeasureBenchmark.cs +++ b/source/Quantities.Benchmark/MeasureBenchmark.cs @@ -25,16 +25,16 @@ public class MeasureBenchmark /* Summary * -BenchmarkDotNet v0.13.12, Arch Linux -Intel Core i7-8565U CPU 1.80GHz (Whiskey Lake), 1 CPU, 8 logical and 4 physical cores +BenchmarkDotNet v0.13.12, Arch Linux ARM +Unknown processor .NET SDK 8.0.101 - [Host] : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 - DefaultJob : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 + [Host] : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD + DefaultJob : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD | Method | Mean | Error | Ratio | |----------------- |----------:|----------:|------:|- -| ProjectTrivial | 0.5208 ns | 0.0091 ns | 1.00 | -| ProjectOntoSame | 0.9375 ns | 0.0077 ns | 1.80 | -| ProjectOntoOther | 2.1371 ns | 0.0046 ns | 4.09 | +| ProjectTrivial | 0.8328 ns | 0.0029 ns | 1.00 | +| ProjectOntoSame | 6.4386 ns | 0.0078 ns | 7.73 | +| ProjectOntoOther | 1.6911 ns | 0.0049 ns | 2.03 | */ diff --git a/source/Quantities.Benchmark/MultiplyingQuantities.cs b/source/Quantities.Benchmark/MultiplyingQuantities.cs index 94c9274a..a5051dfb 100644 --- a/source/Quantities.Benchmark/MultiplyingQuantities.cs +++ b/source/Quantities.Benchmark/MultiplyingQuantities.cs @@ -45,20 +45,20 @@ public class MultiplyingQuantities /* Summary * -BenchmarkDotNet v0.13.12, Arch Linux -Intel Core i7-8565U CPU 1.80GHz (Whiskey Lake), 1 CPU, 8 logical and 4 physical cores +BenchmarkDotNet v0.13.12, Arch Linux ARM +Unknown processor .NET SDK 8.0.101 - [Host] : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 - DefaultJob : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 + [Host] : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD + DefaultJob : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD -| Method | Mean | Error | Ratio | Allocated | Alloc Ratio | -|---------------------- |----------:|----------:|------:|----------:|------------:| -| Trivial | 16.300 ns | 0.0267 ns | 1.00 | - | NA | -| MultiplySi | 6.998 ns | 0.0881 ns | 0.43 | - | NA | -| MultiplyImperial | 6.398 ns | 0.0263 ns | 0.39 | - | NA | -| MultiplyMixed | 6.500 ns | 0.0178 ns | 0.40 | - | NA | -| MultiplyPureSi | 6.414 ns | 0.0142 ns | 0.39 | - | NA | -| MultiplyPowerQuantity | 7.247 ns | 0.0203 ns | 0.44 | - | NA | -| MultiplyAliasQuantity | 6.529 ns | 0.0179 ns | 0.40 | - | NA | +| Method | Mean | Error | Ratio | Allocated | Alloc Ratio | +|---------------------- |---------:|---------:|------:|----------:|------------:| +| Trivial | 69.91 ns | 0.033 ns | 1.00 | - | NA | +| MultiplySi | 29.80 ns | 0.009 ns | 0.43 | - | NA | +| MultiplyImperial | 29.82 ns | 0.008 ns | 0.43 | - | NA | +| MultiplyMixed | 29.75 ns | 0.002 ns | 0.43 | - | NA | +| MultiplyPureSi | 31.82 ns | 0.003 ns | 0.46 | - | NA | +| MultiplyPowerQuantity | 29.81 ns | 0.009 ns | 0.43 | - | NA | +| MultiplyAliasQuantity | 29.82 ns | 0.011 ns | 0.43 | - | NA | */ diff --git a/source/Quantities.Benchmark/Numerics/AlgorithmsPowerBenchmark.cs b/source/Quantities.Benchmark/Numerics/AlgorithmsPowerBenchmark.cs index ee76baa4..9ef52aa5 100644 --- a/source/Quantities.Benchmark/Numerics/AlgorithmsPowerBenchmark.cs +++ b/source/Quantities.Benchmark/Numerics/AlgorithmsPowerBenchmark.cs @@ -18,24 +18,24 @@ public class AlgorithmsPowerBenchmark /* Summary * -BenchmarkDotNet v0.13.12, Arch Linux -Intel Core i7-8565U CPU 1.80GHz (Whiskey Lake), 1 CPU, 8 logical and 4 physical cores +BenchmarkDotNet v0.13.12, Arch Linux ARM +Unknown processor .NET SDK 8.0.101 - [Host] : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 - DefaultJob : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 + [Host] : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD + DefaultJob : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD | Method | Exponent | Mean | Error | Ratio | |-------------- |--------- |----------:|----------:|------:| -| MathPow | 2 | 14.779 ns | 0.0418 ns | 1.00 | -| AlgorithmsPow | 2 | 2.997 ns | 0.0113 ns | 0.20 | +| MathPow | 2 | 69.230 ns | 0.3465 ns | 1.00 | +| AlgorithmsPow | 2 | 5.005 ns | 0.0010 ns | 0.07 | | | | | | | -| MathPow | 5 | 15.207 ns | 0.0110 ns | 1.00 | -| AlgorithmsPow | 5 | 5.935 ns | 0.0178 ns | 0.39 | +| MathPow | 5 | 69.519 ns | 0.3334 ns | 1.00 | +| AlgorithmsPow | 5 | 11.403 ns | 0.0021 ns | 0.16 | | | | | | | -| MathPow | 12 | 15.029 ns | 0.0273 ns | 1.00 | -| AlgorithmsPow | 12 | 9.869 ns | 0.0387 ns | 0.66 | +| MathPow | 12 | 68.143 ns | 0.5493 ns | 1.00 | +| AlgorithmsPow | 12 | 15.918 ns | 0.0020 ns | 0.23 | | | | | | | -| MathPow | 23 | 14.696 ns | 0.0329 ns | 1.00 | -| AlgorithmsPow | 23 | 8.850 ns | 0.0203 ns | 0.60 | +| MathPow | 23 | 69.319 ns | 0.3042 ns | 1.00 | +| AlgorithmsPow | 23 | 25.284 ns | 0.0017 ns | 0.36 | */ diff --git a/source/Quantities.Benchmark/Numerics/PolynomialBenchmark.cs b/source/Quantities.Benchmark/Numerics/PolynomialBenchmark.cs index fbe5583d..c3e627e9 100644 --- a/source/Quantities.Benchmark/Numerics/PolynomialBenchmark.cs +++ b/source/Quantities.Benchmark/Numerics/PolynomialBenchmark.cs @@ -24,16 +24,16 @@ public class PolynomialBenchmark /* Summary * -BenchmarkDotNet v0.13.12, Arch Linux -Intel Core i7-8565U CPU 1.80GHz (Whiskey Lake), 1 CPU, 8 logical and 4 physical cores +BenchmarkDotNet v0.13.12, Arch Linux ARM +Unknown processor .NET SDK 8.0.101 - [Host] : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 - DefaultJob : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 + [Host] : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD + DefaultJob : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD | Method | Mean | Error | Ratio | |-------------------------------- |----------:|----------:|------:| -| EvaluateTrivial | 1.4199 ns | 0.0090 ns | 1.00 | -| EvaluatePolynomial | 0.0906 ns | 0.0008 ns | 0.06 | -| EvaluatePolynomialWithoutOffset | 0.1325 ns | 0.0025 ns | 0.09 | +| EvaluateTrivial | 1.6711 ns | 0.0050 ns | 1.000 | +| EvaluatePolynomial | 1.4257 ns | 0.0016 ns | 0.853 | +| EvaluatePolynomialWithoutOffset | 0.0006 ns | 0.0005 ns | 0.000 | */ diff --git a/source/Quantities.Benchmark/Numerics/PolynomialExponentiationBenchmark.cs b/source/Quantities.Benchmark/Numerics/PolynomialExponentiationBenchmark.cs index 24eef815..c56c576f 100644 --- a/source/Quantities.Benchmark/Numerics/PolynomialExponentiationBenchmark.cs +++ b/source/Quantities.Benchmark/Numerics/PolynomialExponentiationBenchmark.cs @@ -22,27 +22,27 @@ public class PolynomialExponentiationBenchmark /* Summary * -BenchmarkDotNet v0.13.12, Arch Linux -Intel Core i7-8565U CPU 1.80GHz (Whiskey Lake), 1 CPU, 8 logical and 4 physical cores +BenchmarkDotNet v0.13.12, Arch Linux ARM +Unknown processor .NET SDK 8.0.101 - [Host] : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 - DefaultJob : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 - - -| Method | Exponent | Mean | Error | Ratio | -|-------------- |--------- |----------:|----------:|------:| -| TrivialExp | -5 | 28.487 ns | 0.0435 ns | 1.00 | -| PolynomialExp | -5 | 39.455 ns | 0.0633 ns | 1.39 | -| | | | | | -| TrivialExp | -2 | 15.077 ns | 0.0132 ns | 1.00 | -| PolynomialExp | -2 | 26.505 ns | 0.0163 ns | 1.76 | -| | | | | | -| TrivialExp | 0 | 11.868 ns | 0.0240 ns | 1.00 | -| PolynomialExp | 0 | 2.921 ns | 0.0078 ns | 0.25 | -| | | | | | -| TrivialExp | 2 | 15.117 ns | 0.0443 ns | 1.00 | -| PolynomialExp | 2 | 17.293 ns | 0.0481 ns | 1.14 | -| | | | | | -| TrivialExp | 5 | 29.160 ns | 0.0399 ns | 1.00 | -| PolynomialExp | 5 | 33.342 ns | 0.0597 ns | 1.14 | + [Host] : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD + DefaultJob : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD + + +| Method | Exponent | Mean | Error | Ratio | +|-------------- |--------- |---------:|---------:|------:| +| TrivialExp | -5 | 89.98 ns | 0.107 ns | 1.00 | +| PolynomialExp | -5 | 78.83 ns | 0.061 ns | 0.88 | +| | | | | | +| TrivialExp | -2 | 43.16 ns | 0.009 ns | 1.00 | +| PolynomialExp | -2 | 53.00 ns | 0.029 ns | 1.23 | +| | | | | | +| TrivialExp | 0 | 15.05 ns | 0.003 ns | 1.00 | +| PolynomialExp | 0 | 10.81 ns | 0.006 ns | 0.72 | +| | | | | | +| TrivialExp | 2 | 43.16 ns | 0.014 ns | 1.00 | +| PolynomialExp | 2 | 38.07 ns | 0.005 ns | 0.88 | +| | | | | | +| TrivialExp | 5 | 89.88 ns | 0.031 ns | 1.00 | +| PolynomialExp | 5 | 69.28 ns | 0.234 ns | 0.77 | */ diff --git a/source/Quantities.Benchmark/Numerics/PolynomialMultiplicationBenchmark.cs b/source/Quantities.Benchmark/Numerics/PolynomialMultiplicationBenchmark.cs index 5d784497..f9b8253c 100644 --- a/source/Quantities.Benchmark/Numerics/PolynomialMultiplicationBenchmark.cs +++ b/source/Quantities.Benchmark/Numerics/PolynomialMultiplicationBenchmark.cs @@ -37,17 +37,17 @@ public void Setup() /* Summary * -BenchmarkDotNet v0.13.12, Arch Linux -Intel Core i7-8565U CPU 1.80GHz (Whiskey Lake), 1 CPU, 8 logical and 4 physical cores +BenchmarkDotNet v0.13.12, Arch Linux ARM +Unknown processor .NET SDK 8.0.101 - [Host] : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 - DefaultJob : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 + [Host] : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD + DefaultJob : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD -| Method | Mean | Error | Ratio | -|------------------------- |----------:|----------:|------:|- -| TrivialImplementation | 4.467 ns | 0.0118 ns | 1.00 | -| PolynomialMultiplication | 1.255 ns | 0.0051 ns | 0.28 | -| PolynomialDivision | 1.274 ns | 0.0022 ns | 0.29 | -| PolynomialPowerOfTwo | 17.712 ns | 0.0854 ns | 3.96 | +| Method | Mean | Error | Ratio | +|------------------------- |---------:|---------:|------:| +| TrivialImplementation | 15.90 ns | 0.011 ns | 1.00 | +| PolynomialMultiplication | 10.80 ns | 0.005 ns | 0.68 | +| PolynomialDivision | 10.14 ns | 0.007 ns | 0.64 | +| PolynomialPowerOfTwo | 37.59 ns | 0.009 ns | 2.36 | */ diff --git a/source/Quantities.Benchmark/PrefixScalingBenchmarks.cs b/source/Quantities.Benchmark/PrefixScalingBenchmarks.cs index 9396b112..39ac9da6 100644 --- a/source/Quantities.Benchmark/PrefixScalingBenchmarks.cs +++ b/source/Quantities.Benchmark/PrefixScalingBenchmarks.cs @@ -44,24 +44,24 @@ private sealed class ToDouble : IPrefixInject /* Summary * -BenchmarkDotNet v0.13.12, Arch Linux -Intel Core i7-8565U CPU 1.80GHz (Whiskey Lake), 1 CPU, 8 logical and 4 physical cores +BenchmarkDotNet v0.13.12, Arch Linux ARM +Unknown processor .NET SDK 8.0.101 - [Host] : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 - DefaultJob : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 + [Host] : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD + DefaultJob : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD | Method | Exponent | Mean | Error | Ratio | |-------------------- |--------- |----------:|----------:|------:| -| Baseline | -4 | 24.916 ns | 0.0351 ns | 1.00 | -| MetricPrefixScaling | -4 | 8.622 ns | 0.0429 ns | 0.35 | -| BinaryPrefixScaling | -4 | 1.523 ns | 0.0056 ns | 0.06 | +| Baseline | -4 | 94.290 ns | 0.0054 ns | 1.00 | +| MetricPrefixScaling | -4 | 30.571 ns | 0.0014 ns | 0.32 | +| BinaryPrefixScaling | -4 | 7.211 ns | 0.0014 ns | 0.08 | | | | | | | -| Baseline | 0 | 24.313 ns | 0.0416 ns | 1.00 | -| MetricPrefixScaling | 0 | 2.939 ns | 0.0047 ns | 0.12 | -| BinaryPrefixScaling | 0 | 1.180 ns | 0.0433 ns | 0.05 | +| Baseline | 0 | 94.279 ns | 0.0044 ns | 1.00 | +| MetricPrefixScaling | 0 | 11.660 ns | 0.0017 ns | 0.12 | +| BinaryPrefixScaling | 0 | 7.212 ns | 0.0011 ns | 0.08 | | | | | | | -| Baseline | 5 | 25.786 ns | 0.0526 ns | 1.00 | -| MetricPrefixScaling | 5 | 8.173 ns | 0.0459 ns | 0.32 | -| BinaryPrefixScaling | 5 | 7.491 ns | 0.0157 ns | 0.29 | +| Baseline | 5 | 94.835 ns | 0.0057 ns | 1.00 | +| MetricPrefixScaling | 5 | 30.931 ns | 0.0091 ns | 0.33 | +| BinaryPrefixScaling | 5 | 28.922 ns | 0.0035 ns | 0.30 | */ diff --git a/source/Quantities.Benchmark/SerializationComparisonBenchmark.cs b/source/Quantities.Benchmark/SerializationComparisonBenchmark.cs index f7ffa33d..19449ce4 100644 --- a/source/Quantities.Benchmark/SerializationComparisonBenchmark.cs +++ b/source/Quantities.Benchmark/SerializationComparisonBenchmark.cs @@ -20,15 +20,15 @@ public class SerializationComparisonBenchmark /* Summary * -BenchmarkDotNet v0.13.12, Arch Linux -Intel Core i7-8565U CPU 1.80GHz (Whiskey Lake), 1 CPU, 8 logical and 4 physical cores +BenchmarkDotNet v0.13.12, Arch Linux ARM +Unknown processor .NET SDK 8.0.101 - [Host] : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 - DefaultJob : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2 + [Host] : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD + DefaultJob : .NET 8.0.1 (8.0.123.58001), Arm64 RyuJIT AdvSIMD | Method | Mean | Error | Ratio | Allocated | Alloc Ratio | |----------- |---------:|----------:|------:|----------:|------------:| -| TextJson | 1.412 μs | 0.0017 μs | 1.00 | 801 B | 1.00 | -| Newtonsoft | 2.158 μs | 0.0098 μs | 1.53 | 4043 B | 5.05 | +| TextJson | 5.064 μs | 0.0027 μs | 1.00 | 801 B | 1.00 | +| Newtonsoft | 8.528 μs | 0.0025 μs | 1.68 | 4043 B | 5.05 | */