8000 simple: suggest replacing "t1.UnixNano() >= t2.UnixNano()" with "!t1.Before(t2)" and vice-versa · Issue #995 · dominikh/go-tools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
simple: suggest replacing "t1.UnixNano() >= t2.UnixNano()" with "!t1.Before(t2)" and vice-versa #995
Open
@ainar-g

Description

@ainar-g

(Perhaps more of a quickfix, I'm not sure.)

Apart from a couple of nanoseconds of difference in benchmarks (on my machine), they are equivalent, but one is shorter and simpler than the other.

Metadata

Metadata

Assignees

No one assigned

    Labels

    aggressiveA set of checks that is more prone to false positives but is helpful during code reviewneeds-decisionWe have to decide if this check is feasible and desirablenew-check

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0