Skip to content

Limit inlining for stdlibunittest. This saves a lot of compilation time #2975

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 1 commit into from
Jun 10, 2016
Merged

Conversation

trentxintong
Copy link
Contributor

@trentxintong trentxintong commented Jun 9, 2016

Limit inlining for stdlibunittest. This saves a lot of compilation time for some of the stdlibunittests.

i.e. For the FixPoint benchmark, from 256s on my machine to 27s.

@trentxintong
Copy link
Contributor Author

trentxintong commented Jun 9, 2016

@gribozavr Can you please review this ?

I have some concerns.

Is this a good place to add the noinline thing to reduce the compilation time ? I am a bit worried about effectiveness/coverage of test after this noinline thing is added. Are these tests supposed to be compiled and optimized separately., i.e. do you think allowing them to be inlined into top-level function can result in better testing for the optimizer ?

@gribozavr
Copy link
Contributor

gribozavr commented Jun 9, 2016

@trentxintong LGTM, thank you! Could you add the attribute to the other overload of test() as well (a few lines below), and also add a comment above the attribute, something like:

This method is prohibited from inlining because inlining the test harness into the test is not interesting from the runtime performance perspective. On the contrary, it sometimes severely affects the compile time of the test code.

for some of the stdlibunittests.

i.e. For the FixPoint benchmark, from 256s on my machine to 27s.

rdar://26688483
@trentxintong
Copy link
Contributor Author

@gribozavr I modified your comment a bit, how does this look ?

@trentxintong
Copy link
Contributor Author

@swift-ci Please smoke test

@gribozavr
Copy link
Contributor

LGTM, thanks!

@gribozavr gribozavr merged commit 6f139d7 into swiftlang:master Jun 10, 2016
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.

4 participants