Skip to content

[GSB] Performance improvements for +Asserts builds #9529

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

Merged
merged 3 commits into from
May 12, 2017

Conversation

DougGregor
Copy link
Member

@DougGregor DougGregor commented May 12, 2017

When type-checking the standard library, we were spending a lot of time in one particular assertion in the GenericSignatureBuilder that checks for consistent selection of archetype anchors. Disable that assertion unless a new debugging #define named SWIFT_GSB_EXPENSIVE_ASSERTIONS is enabled. This shaves 5 seconds off the type-checking time for my RelWithDebInfo build of the Swift standard library (a 23% speed-up).

Part of rdar://problem/32116933

…icEnvironment().

GenericSignature::createGenericEnvironment() is a better API for this.
…fine.

Put the archetype anchor consistency checking behind a separate
it is really expensive: turning this checking off shaves 5s off the
type-checking time of the standard library in my Release+Asserts build
(~23% speedup).
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit 6285cc5 into swiftlang:master May 12, 2017
@DougGregor DougGregor deleted the gsb-perf-cleanups branch May 12, 2017 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants