| should be replaced by ||
viveknuna opened this issue · comments
viveknuna commented
the below code DateTimeOffsetBenchmarks.cs files should be fixed, Please correct me If I am wrong.
[Benchmark]
public bool Comparison_Operators() => (sample < earlier) | (sample < sample) | (sample < later);
It should be changed to
[Benchmark]
public bool Comparison_Operators() => (sample < earlier) || (sample < later);
Jon Skeet commented
No, it shouldn't. The point is to benchmark how long it takes to perform all three comparison situations - equality, left side greater, right side greater.