Skip to content

Remove pessimization of print() performance in 4.1 branch. #14135

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
Jan 25, 2018
Merged

Remove pessimization of print() performance in 4.1 branch. #14135

merged 1 commit into from
Jan 25, 2018

Conversation

tkremenek
Copy link
Member

@tkremenek tkremenek commented Jan 24, 2018

Remove pessimization of print() performance in 4.1 branch by using 'nil' instead of an empty closure.
rdar://problem/36839411

As pointed out in Ole Begeman's blog:
https://oleb.net/blog/2016/09/playground-print-hook/

The playground print hook is being initialized a a non-null noop hook,
which causes the fast paths in the print functions to be unused, and
forcing the creation of a tee stream for things that have nothing to
do with playgrounds.  It is sad that no one noticed this...
@tkremenek tkremenek changed the base branch from master to swift-4.1-branch January 24, 2018 22:18
@tkremenek
Copy link
Member Author

@swift-ci test

@tkremenek tkremenek merged commit e3ba566 into swiftlang:swift-4.1-branch Jan 25, 2018
@tkremenek tkremenek deleted the faster-print-4.1 branch January 25, 2018 00:04
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