Run compiler specs in release mode #13122
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Building the compiler (or compiler specs in this case) in release mode has a hefty upfront cost, but it improves execution speed of the compiler a lot. The extra overhead is not worth it if you only use the compiler a couple of times, but when you use it a lot, it makes sense to build in release mode.
The compiler specs are pretty huge and thus use the compiler a lot. So I figured, why not try build
compiler_spec
in release mode to speed up the execution? Compiler specs are a huge portion of CI job runtime, so maybe we can speed things up a bit.So I did that in this branch and compared the runtimes with previous runs on
master
.The duration of spec runs varies quite a bit, actually. So it must be taken with a grain of salt. I did only one CI run in release mode yet.
But there's a clear tendency: Each individual CI job which runs
compiler_spec
finished more quickly in release mode than in previous runs. The speed up is typically between 3-10 minutes.As an example, this is the comparison of the
x86_64-gnu-test
jobs inLinux CI
:The total sum of durations dropeed from 6:22:27 to 5:14:08.
So running specs in release mode seems to bring quite a noticable performance improvement.