Skip to content

Instantly share code, notes, and snippets.

@jzebedee
Created December 17, 2021 18:18
Show Gist options
  • Save jzebedee/5a89603f6bfb53181969fa03b83504c5 to your computer and use it in GitHub Desktop.
Save jzebedee/5a89603f6bfb53181969fa03b83504c5 to your computer and use it in GitHub Desktop.
SqrtBenchmarks

// * Summary *

BenchmarkDotNet=v0.13.1, OS=Windows 10.0.22000 Intel Core i7-8650U CPU 1.90GHz (Kaby Lake R), 1 CPU, 8 logical and 4 physical cores .NET SDK=6.0.101 [Host] : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT RyuJitX64 : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT

Job=RyuJitX64 Jit=RyuJit Platform=X64

Method Mean Error StdDev Median Ratio RatioSD BranchInstructions/Op BranchMispredictions/Op
SqrtsFast 7.311 ms 0.1819 ms 0.5364 ms 7.143 ms 4.00 0.21 12,161,700 5,034
Sqrts 1.798 ms 0.0133 ms 0.0104 ms 1.797 ms 1.00 0.00 2,116,412 508
SqrtsF 1.156 ms 0.0229 ms 0.0407 ms 1.147 ms 0.64 0.03 2,110,496 460

// * Hints * Outliers SqrtBenchmarks.Sqrts: RyuJitX64 -> 3 outliers were removed (1.86 ms..1.88 ms) SqrtBenchmarks.SqrtsF: RyuJitX64 -> 3 outliers were removed (1.32 ms..1.37 ms)

// * Legends * Mean : Arithmetic mean of all measurements Error : Half of 99.9% confidence interval StdDev : Standard deviation of all measurements Median : Value separating the higher half of all measurements (50th percentile) Ratio : Mean of the ratio distribution ([Current]/[Baseline]) RatioSD : Standard deviation of the ratio distribution ([Current]/[Baseline]) BranchInstructions/Op : Hardware counter 'BranchInstructions' per single operation BranchMispredictions/Op : Hardware counter 'BranchMispredictions' per single operation 1 ms : 1 Millisecond (0.001 sec)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment