Skip to content

Latest commit

 

History

History
37 lines (34 loc) · 3.03 KB

conditional-expressions.org

File metadata and controls

37 lines (34 loc) · 3.03 KB

Conditional expressions and operators

NamespaceTypeMethodcolorMeanErrorStdDevMedian
F#**IfExpression**FirstWhite**2.258 ns**0.1424 ns0.1462 ns2.218 ns
F#PatternMatchingFirstWhite5.843 ns0.1660 ns0.2863 ns5.771 ns
C#IfStatementFirstWhite2.378 ns0.1428 ns0.2647 ns2.283 ns
C#MultipleIfStatementsFirstWhite2.390 ns0.1418 ns0.2593 ns2.254 ns
C#SwitchExpressionFirstWhite3.687 ns0.1718 ns0.3141 ns3.647 ns
C#SwitchStatementFirstWhite3.716 ns0.1698 ns0.2929 ns3.602 ns
C#TernaryOperatorFirstWhite2.269 ns0.1133 ns0.1113 ns2.255 ns
F#IfExpressionLastPurple11.862 ns0.2906 ns0.3230 ns11.792 ns
F#PatternMatchingLastPurple4.285 ns0.1712 ns0.1517 ns4.254 ns
C#IfStatementLastPurple10.368 ns0.2935 ns0.2883 ns10.265 ns
C#MultipleIfStatementsLastPurple9.431 ns0.2768 ns0.2311 ns9.493 ns
C#**SwitchExpression**LastPurple**3.512 ns**0.1551 ns0.1211 ns3.461 ns
C#SwitchStatementLastPurple3.692 ns0.1662 ns0.3981 ns3.528 ns
C#TernaryOperatorLastPurple4.385 ns0.1792 ns0.2330 ns4.359 ns
F#IfExpressionMinValueBlack5.680 ns0.2016 ns0.1787 ns5.584 ns
F#**PatternMatching**MinValueBlack**2.583 ns**0.0728 ns0.0608 ns2.574 ns
C#IfStatementMinValueBlack3.321 ns0.1359 ns0.1135 ns3.331 ns
C#MultipleIfStatementsMinValueBlack4.069 ns0.1802 ns0.2466 ns4.033 ns
C#SwitchExpressionMinValueBlack2.962 ns0.1587 ns0.2738 ns2.881 ns
C#SwitchStatementMinValueBlack3.500 ns0.1687 ns0.2473 ns3.395 ns
C#TernaryOperatorMinValueBlack4.313 ns0.1649 ns0.2086 ns4.248 ns

Summary

BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19043 Intel Xeon Gold 6130 CPU 2.10GHz, 1 CPU, 4 logical and 4 physical cores .NET Core SDK=5.0.300 [Host] : .NET Core 5.0.6 (CoreCLR 5.0.621.22011, CoreFX 5.0.621.22011), X64 RyuJIT DefaultJob : .NET Core 5.0.6 (CoreCLR 5.0.621.22011, CoreFX 5.0.621.22011), X64 RyuJIT