nodatime / nodatime

A better date and time API for .NET

Home Page:https://nodatime.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

| should be replaced by ||

viveknuna opened this issue · comments

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);

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.

@jskeet thank you for the clarification