-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Let's not create regex for every function call. #1384
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
Conversation
@@ -504,16 +504,17 @@ protected bool CheckEqualityFromPathsCore(string relPath, string basePath, strin | |||
} | |||
} | |||
|
|||
private static Regex MatchNumbers = new Regex(@"\b[0-9]+\.?[0-9]*(E-[0-9]*)?\b", RegexOptions.IgnoreCase | RegexOptions.Compiled); |
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.
make it readonly.
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.
LGTM, you may need to rebase it after #1320
@Anipik let's see whose tests get finished first :D |
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.
Wow in Windows_Debug Microsoft.ML.Runtime.RunTests.TestPredictors now took 5 mins 👏
Sorry, I've create this PR on top of branch in this repo, so now it's a bit tricky to modify. So I rather create new PR with branch in my fork and close this one. |
Maybe this would speed up our tests?
#1382
#1348