-
Notifications
You must be signed in to change notification settings - Fork 789
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
Reduce allocations by favoring TryGetValue over TryFind #5715
Conversation
@KevinRansom @cartermp the build error seems unrelated. Something wrong? |
@forki I'm just going over the weekends PR's right now. I will get back to you. |
I think they may be related: open namespaces or file ordering perhaps?
|
# Conflicts: # src/fsharp/NameResolution.fs
ok let me check |
@KevinRansom it looks like FCS is using outdated fsharp.core. |
Can we get some perf numbers on this change? |
I imagine the perf improvements are going to be negligable. My intuition is that there will be indeed be fewer allocations, but not nearly enough to notice. It is however a decent enough refactoring, I am fairly confident that if TryGetValue had existed when the code was originaly written, it would have been written this way. My sole concern, is having to push fcs up to FSharp.Core 4.5. Kevin |
I don't expect this to be measurable. These little Options are easy to
collect. It's just that we open up more and more and more of these
refactors and one day type checker is again 10 percent faster than last
release. Like we did over last year.
Kevin Ransom (msft) <notifications@github.com> schrieb am Mo., 1. Okt.
2018, 21:36:
… I imagine the perf improvements are going to be negligable. My intuition
is that there will be indeed be fewer allocations, but not nearly enough to
notice.
It is however a decent enough refactoring, I am fairly confident that if
TryGetValue had existed when the code was originaly written, it would have
been written this way. My sole concern, is having to push fcs up to
FSharp.Core 4.5.
Kevin
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5715 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADgNGgz8FdivcoT7lZP0J4wD0O68JP0ks5ugm7MgaJpZM4XBnXn>
.
|
Thanks for this. |
No description provided.