Table of Contents

Performance Comparison

Configuration

BenchmarkDotNet v0.13.7, Windows 11
12th Gen Intel Core i7-12700K, 1 CPU, 20 logical and 12 physical cores
.NET SDK 7.0.306
  [Host]    : .NET 7.0.9 (7.0.923.32018), X64 RyuJIT AVX2
  MediumRun : .NET 7.0.9 (7.0.923.32018), X64 RyuJIT AVX2

Job=MediumRun  Toolchain=.NET 7.0  IterationCount=15  
LaunchCount=2  WarmupCount=10  

Legend

  • 1 μs = 1 Microsecond (0.000001 sec)
  • 1 ns = 1 Nanosecond (0.000000001 sec)

Processor

Version Method Mean Error StdDev Median Gen 0 Gen 1 Gen 2 Allocated
3.7.3 Parse 39,567.9 ns 1,110.27 ns 1,661.80 ns 38,688.9 ns 4.8218 0.1221 - 63736 B
4.0.0 Parse 9,128.180 ns 272.8478 ns 399.9368 ns 9,416.379 ns 0.3510 - - 4760 B
4.2.0 Parse 14,855.62 ns 216.372 ns 323.856 ns 14,539.30 ns 0.3510 - - 4872 B
4.3.0 Parse 10,434.04 ns 113.693 ns 170.171 ns 10,454.28 ns 0.3662 - - 4848 B
3.7.3 Solve 55,260.0 ns 271.77 ns 406.78 ns 55,278.7 ns 7.3853 0.1831 - 96920 B
4.0.0 Solve 15,319.497 ns 47.8317 ns 70.1111 ns 15,294.940 ns 0.7935 - - 10672 B
4.2.0 Solve 22,074.89 ns 97.250 ns 142.548 ns 24,828.41 ns 0.7935 - - 9936 B
4.3.0 Solve 15,683.42 ns 59.627 ns 89.247 ns 15,696.91 ns 0.7019 - - 9552 B

Differentiator

Version Method Mean Error StdDev Median Gen 0 Gen 1 Gen 2 Allocated
3.7.3 ComplexExpression 4,318.2 ns 38.37 ns 57.43 ns 4,329.5 ns 1.3580 0.0534 - 17776 B
4.0.0 ComplexExpression 1,369.960 ns 3.2650 ns 4.7857 ns 1,371.025 ns 0.1144 - - 1520 B
4.2.0 ComplexExpression 1,359.16 ns 3.460 ns 5.179 ns 1,358.60 ns 0.1144 - - 1520 B

Simplifier

Version Method Mean Error StdDev Median Gen 0 Gen 1 Gen 2 Allocated
3.7.3 Simplify 1,875.1 ns 11.00 ns 16.47 ns 1,873.3 ns 0.0019 - - 32 B
4.0.0 Simplify 5,809.795 ns 45.4377 ns 63.6974 ns 5,855.303 ns 0.1221 - - 1680 B
4.2.0 Simplify 11,525.65 ns 140.113 ns 205.376 ns 11,467.59 ns 0.1526 - - 2064 B

TypeAnalyzer

Version Method Mean Error StdDev Median Gen 0 Gen 1 Gen 2 Allocated
3.7.3 GCD 198.2 ns 0.51 ns 0.73 ns 198.2 ns 0.0293 - - 384 B
4.0.0 GCD 87.458 ns 0.2392 ns 0.3581 ns 87.430 ns - - - -
4.2.0 GCD 87.40 ns 0.550 ns 0.823 ns 87.07 ns - - - -
3.7.3 GCDUndefined 188.4 ns 1.20 ns 1.73 ns 189.4 ns 0.0293 - - 384 B
4.0.0 GCDUndefined 58.921 ns 0.2549 ns 0.3816 ns 58.999 ns - - - -
4.2.0 GCDUndefined 58.61 ns 0.258 ns 0.369 ns 58.45 ns - - - -
3.7.3 Matrix 258.7 ns 0.25 ns 0.37 ns 258.7 ns 0.0734 - - 960 B
4.0.0 Matrix 70.194 ns 0.8782 ns 1.3145 ns 70.143 ns - - - -
4.2.0 Matrix 68.56 ns 0.506 ns 0.757 ns 68.32 ns - - - -
3.7.3 Count 240.5 ns 0.29 ns 0.40 ns 240.6 ns 0.0410 - - 536 B
4.0.0 Count 117.975 ns 0.5888 ns 0.8813 ns 118.141 ns - - - -
4.2.0 Count 118.29 ns 0.500 ns 0.748 ns 118.01 ns - - - -
3.7.3 Exp 702.3 ns 2.46 ns 3.68 ns 703.0 ns 0.0286 - - 384 B
4.0.0 Exp 759.043 ns 2.7119 ns 4.0590 ns 757.408 ns - - - -
4.2.0 Exp 815.85 ns 3.774 ns 5.649 ns 816.68 ns - - - -

Lexer/Parser Creation

Version Method Mean Error StdDev Median Gen 0 Gen 1 Gen 2 Allocated
3.7.3 ParserCtor 93,131.4 ns 847.65 ns 1,242.47 ns 92,813.9 ns 11.2305 2.3193 - 147440 B
4.0.0 ParserCtor 7.849 ns 0.1236 ns 0.1773 ns 7.843 ns 0.0061 - - 80 B
4.2.0 ParserCtor 158.38 ns 1.413 ns 2.115 ns 158.32 ns 0.0880 0.0005 - 1152 B

Matrix Multiplication

Version Method Size Mean Error StdDev Median Gen 0 Gen 1 Gen 2 Allocated
3.7.3 MulMatrix 2 1,590.8 ns 8.13 ns 11.39 ns 1,589.8 ns 0.2613 - - 3416 B
4.0.0 MulMatrix 2 342.961 ns 1.4831 ns 2.1271 ns 343.864 ns 0.1340 - - 1752 B
4.2.0 MulMatrix 2 358.36 ns 1.543 ns 2.262 ns 357.42 ns 0.1340 - - 1752 B
3.7.3 MulMatrix 10 11,072.6 ns 75.67 ns 113.26 ns 11,079.9 ns 4.5319 0.2289 - 59242 B
4.0.0 MulMatrix 10 12,048.821 ns 300.9533 ns 441.1334 ns 12,349.101 ns 4.5166 0.1678 - 59160 B
4.2.0 MulMatrix 10 11,380.06 ns 75.958 ns 106.483 ns 11,425.14 ns 4.5166 0.1678 - 59160 B
3.7.3 MulMatrix 100 7,068,774.1 ns 71,619.18 ns 107,196.22 ns 7,058,659.4 ns 3726.5625 1007.8125 492.1875 48592538 B
4.0.0 MulMatrix 100 5,018,328.516 ns 119,334.8476 ns 178,614.7809 ns 5,007,332.031 ns 3734.3750 445.3125 - 48765732 B
4.2.0 MulMatrix 100 4,937,669.84 ns 89,501.219 ns 133,961.210 ns 4,940,487.50 ns 3734.3750 445.3125 - 48765451 B

Vector Benchmark

Version Method Size Mean Error StdDev Median Gen0 Gen1 Allocated
4.2.0 AbsVector 2 44.48 ns 0.243 ns 0.356 ns 44.44 ns 0.0147 - 192 B
4.3.0 AbsVector 2 29.54 ns 0.150 ns 0.211 ns 29.55 ns 0.0122 - 160 B
4.2.0 AbsVector 10 105.44 ns 0.272 ns 0.391 ns 105.47 ns 0.0342 - 448 B
4.3.0 AbsVector 10 57.18 ns 0.149 ns 0.224 ns 57.13 ns 0.0318 - 416 B
4.2.0 AbsVector 100 762.24 ns 2.667 ns 3.560 ns 760.70 ns 0.2546 - 3328 B
4.3.0 AbsVector 100 385.94 ns 10.527 ns 15.098 ns 386.30 ns 0.2518 0.0005 3296 B
4.2.0 AddVectors 2 54.17 ns 0.150 ns 0.211 ns 54.14 ns 0.0244 - 320 B
4.3.0 AddVectors 2 54.05 ns 0.162 ns 0.228 ns 54.09 ns 0.0244 - 320 B
4.2.0 AddVectors 10 117.03 ns 0.361 ns 0.529 ns 117.00 ns 0.0685 - 896 B
4.3.0 AddVectors 10 114.50 ns 2.232 ns 3.341 ns 114.15 ns 0.0685 - 896 B
4.2.0 AddVectors 100 782.58 ns 17.598 ns 26.339 ns 767.28 ns 0.5636 0.0029 7376 B
4.3.0 AddVectors 100 767.65 ns 5.711 ns 8.371 ns 766.53 ns 0.5636 0.0029 7376 B
4.2.0 SubVectors 2 53.54 ns 0.163 ns 0.239 ns 53.51 ns 0.0244 - 320 B
4.3.0 SubVectors 2 53.45 ns 0.165 ns 0.241 ns 53.51 ns 0.0244 - 320 B
4.2.0 SubVectors 10 112.32 ns 2.491 ns 3.651 ns 114.78 ns 0.0685 - 896 B
4.3.0 SubVectors 10 112.71 ns 2.412 ns 3.459 ns 112.65 ns 0.0685 - 896 B
4.2.0 SubVectors 100 786.82 ns 12.504 ns 18.329 ns 785.22 ns 0.5636 0.0029 7376 B
4.3.0 SubVectors 100 776.80 ns 5.631 ns 8.076 ns 777.22 ns 0.5636 0.0029 7376 B
3.7.3 MulVectors 2 14,027.3 ns 134.79 ns 201.74 ns 14,071.5 ns 1.4343 0.0153 18808 B
4.0.0 MulVectors 2 93.031 ns 1.2393 ns 1.8549 ns 92.955 ns 0.0360 - 472 B
4.2.0 MulVectors 2 48.75 ns 0.099 ns 0.138 ns 48.72 ns 0.0214 - 280 B
4.3.0 MulVectors 2 49.51 ns 0.166 ns 0.243 ns 49.60 ns 0.0214 - 280 B
3.7.3 MulVectors 10 14,123.0 ns 87.57 ns 128.37 ns 14,134.2 ns 1.4801 0.0153 19448 B
4.0.0 MulVectors 10 253.851 ns 0.7623 ns 1.1410 ns 253.907 ns 0.0944 - 1240 B
4.2.0 MulVectors 10 130.70 ns 0.562 ns 0.823 ns 130.61 ns 0.0606 - 792 B
4.3.0 MulVectors 10 106.83 ns 1.527 ns 2.238 ns 108.37 ns 0.0606 - 792 B
3.7.3 MulVectors 100 16,257.3 ns 339.89 ns 476.48 ns 16,568.3 ns 2.0447 0.0305 26648 B
4.0.0 MulVectors 100 2,199.170 ns 6.2792 ns 9.0054 ns 2,197.910 ns 0.7553 0.0038 9880 B
4.2.0 MulVectors 100 985.08 ns 11.792 ns 17.285 ns 979.53 ns 0.4997 0.0019 6552 B
4.3.0 MulVectors 100 743.84 ns 11.173 ns 15.663 ns 749.49 ns 0.5007 0.0019 6552 B
4.2.0 MulVectorByNumber 2 39.93 ns 0.163 ns 0.244 ns 39.93 ns 0.0177 - 232 B
4.3.0 MulVectorByNumber 2 40.30 ns 0.301 ns 0.451 ns 40.36 ns 0.0177 - 232 B
4.2.0 MulVectorByNumber 10 74.64 ns 0.468 ns 0.656 ns 74.67 ns 0.0422 - 552 B
4.3.0 MulVectorByNumber 10 76.08 ns 0.341 ns 0.511 ns 76.05 ns 0.0422 - 552 B
4.2.0 MulVectorByNumber 100 456.34 ns 6.950 ns 9.967 ns 457.17 ns 0.3176 0.0010 4152 B
4.3.0 MulVectorByNumber 100 460.04 ns 7.617 ns 10.427 ns 459.20 ns 0.3176 0.0010 4152 B

Transpose function

Version Method Size Mean Error StdDev Median Gen 0 Gen 1 Gen 2 Allocated
3.7.3 TransposeMatrix (2, 3) 1,327.6 ns 7.23 ns 10.60 ns 1,325.7 ns 0.2060 - - 2695 B
4.0.0 TransposeMatrix (2, 3) 216.720 ns 0.7138 ns 1.0463 ns 216.321 ns 0.0763 - - 1000 B
4.2.0 TransposeMatrix (2, 3) 227.81 ns 0.711 ns 1.042 ns 228.04 ns 0.0763 - - 1000 B
3.7.3 TransposeMatrix (8, 10) 4,521.8 ns 22.93 ns 34.32 ns 4,529.6 ns 0.4501 - - 5860 B
4.0.0 TransposeMatrix (8, 10) 1,502.158 ns 29.4853 ns 43.2191 ns 1,525.344 ns 0.3757 0.0038 - 4928 B
4.2.0 TransposeMatrix (8, 10) 1,732.84 ns 3.811 ns 5.703 ns 1,734.06 ns 0.3757 0.0038 - 4928 B

Converters

Version Method Mean Error StdDev Median Gen0 Allocated
4.2.0 AngleConvert 186.9 ns 2.19 ns 3.27 ns 187.0 ns 0.0048 64 B
4.2.0 PowerConvert 170.9 ns 0.70 ns 1.05 ns 171.1 ns 0.0060 80 B
4.2.0 TemperatureConvert 315.7 ns 0.74 ns 1.03 ns 315.7 ns 0.0119 160 B
4.2.0 MassConvert 179.7 ns 0.31 ns 0.44 ns 179.6 ns 0.0060 80 B
4.2.0 AreaConvert 225.5 ns 1.56 ns 2.33 ns 225.1 ns 0.0048 64 B
4.2.0 LengthConvert 187.7 ns 2.79 ns 4.17 ns 189.2 ns 0.0060 80 B
4.2.0 TimeConvert 241.0 ns 25.11 ns 36.81 ns 207.9 ns 0.0060 80 B
4.2.0 VolumeConvert 242.6 ns 5.20 ns 7.62 ns 248.1 ns 0.0048 64 B