Optimizations for the WritePdbInfo function#61
Optimizations for the WritePdbInfo function#61jack-pappas wants to merge 1 commit intodotnet:fsharp4from
Conversation
|
Thanks Jack. Do you have any reproducible measurements/tests that show the benefit of these changes? |
…d intermediate data structure allocations. Removed some unnecessary uses of ref cells.
c4a68b0 to
ae0d2a8
Compare
|
@jack-pappas - yes, this would need perf figures @latkin and I may need to write up some notes about what constitutes a minimum-bar for a compiler perf improvement to be accepted - I think minimally
Without the demonstrated perf improvement a PR couldn't be accepted (and would be closed pending further information), hence the need for CI to make it cheap to reproduce these. BTW I notice some of the code changes are just cleanup - you could resubmit those as a separate checkin labelled "cleanup" - it is very, very helpful to separate code cleanup from perf improvements. Again @latkin and I may need to write notes on what constitutes an acceptable "cleanup" checkin and at what stage. |
|
Thank you for the submission. Per the contribution guidelines, perf optimizations should include tests and quantitative analysis showing reliable gains from the change, which others can reproduce. Please re-open when tests and analysis are in place. |
I made some basic optimizations to the
WritePdbInfofunction in an attempt to speed it up; mostly, I've removed some closure allocations (usingforloops instead of.iterfunctions) and changed an unnecessary use of a ref cell to use a normal variable binding instead.Overall compilation performance seems to be only slightly improved, though I've only tested on my development machine. The benefit may be greater for machines with slower CPU and/or memory (e.g., CI servers running on VMs).