-
Notifications
You must be signed in to change notification settings - Fork 790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some minor perf improvements #16941
Some minor perf improvements #16941
Conversation
❗ Release notes requiredCaution No release notes found for the changed paths (see table below). Please make sure to add an entry with an informative description of the change as well as link to this pull request, issue and language suggestion if applicable. Release notes for this repository are based on Keep A Changelog format. The following format is recommended for this repository:
If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request. You can open this PR in browser to add release notes: open in github.dev
|
@@ -3215,7 +3215,7 @@ let count f arr = | |||
module FileSystemUtilities = | |||
open System.Reflection | |||
open System.Globalization | |||
let progress = try Environment.GetEnvironmentVariable("FSharp_DebugSetFilePermissions") <> null with _ -> false | |||
let progress = try not (isNull (Environment.GetEnvironmentVariable("FSharp_DebugSetFilePermissions"))) with _ -> false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isNotNull
?
fsharp/src/Compiler/Utilities/illib.fs
Line 88 in 890e6e1
let inline isNotNull (x: 'T) = not (isNull x) |
@@ -54,11 +54,12 @@ module AttributeHelpers = | |||
| Some(Attrib(_, _, [ AttribBoolArg p ], _, _, _, _)) -> Some p | |||
| _ -> None | |||
|
|||
[<return: Struct>] | |||
let (|ILVersion|_|) (versionString: string) = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are covered in @psfinaki PR likely, and we decided to wait with changes for a bit, since we already have some SO reports in compiler and those need careful verification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reason to postpone it is here: #16316 (comment)
There were stackoverflows when allocating more things on stack in certain cases. We will need to make sure we aren't hitting (or won't be hitting) it with AP changes.
Description
Some things that got detected by the work happening in ionide/ionide-analyzers#85
Checklist
Test cases added
Performance benchmarks added in case of performance changes
Release notes entry updated: