Skip to content

monad: Optimize IsLinux check #186

Description

Per Jason Shirk If runtime checks are desired, please use something like private static readonly bool _isLinux = System.IO.Path.DirectorySeparatorChar == ' '; And then return this bool in the IsLinux method. I have verified that RyuJIT generates much better code this way, it can actually inline everything whereas it doesn't as written. VSO create date - 9/8/2015 11:50:00 VSO closed date - 9/8/2015 18:53:00

Activity

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions