-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Implement the mimalloc option to speed up the compiler on Windows #76563
Conversation
@swift-ci please test |
33168a0
to
cef5a5c
Compare
@swift-ci please test |
This is disabled by default.
cef5a5c
to
7b437ea
Compare
@swift-ci please test |
@swift-ci please test Linux Platform |
$Args += "-l" | ||
$Args += $ExePath | ||
Invoke-Program "$SourceCache\mimalloc\bin\minject" @Args | ||
dir "$ExePath" |
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.
Debugging left overs?
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.
I mean to keep it so that we can verify that the import table is updated in the toolchain build log
@hjyamauchi have you observed significant compiler performance gains using mimalloc? Would you recommend the MS Swift Toolchain use it by default in an upcoming release? |
@gregcotten In our internal app build, the build was about ~4% faster (which we think is meaningful in our long, long build times) and it seemed stable/robust. We have a plan to have it enabled by default in our future internal toolchain update but that's currently blocked by various other factors. I encourage testing it out independently, if you can :) |
Thanks for the info! After adopting macros into a Windows Swift production app compile times have grown exponentially and I'm looking for any savings possible! Not sure if it's worth the hassle of maintaining my own toolchain though... |
Sure! We, BCNY, have our own toolchain builds where it's enabled by default, if you're interested (note they're separate from the official swift.org builds): https://github.com/thebrowsercompany/swift-build We may be able to enable it by default upstream but I cannot tell whether or when it would happen :) |
This is disabled by default.