Skip to content

[stdlib] Audit inlinability in BridgeObjectiveC [WIP] #20470

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
Nov 10, 2018

Conversation

moiseev
Copy link
Contributor

@moiseev moiseev commented Nov 9, 2018

rdar://problem/45949961

@moiseev
Copy link
Contributor Author

moiseev commented Nov 9, 2018

@swift-ci Please benchmark

@moiseev
Copy link
Contributor Author

moiseev commented Nov 9, 2018

@swift-ci Please smoke test

@moiseev moiseev changed the title [stdlib] Audit inlinability in BridgeObjectiveC [stdlib] Audit inlinability in BridgeObjectiveC [WIP] Nov 9, 2018
@moiseev
Copy link
Contributor Author

moiseev commented Nov 9, 2018

@swift-ci Please test

@moiseev
Copy link
Contributor Author

moiseev commented Nov 10, 2018

@swift-ci Please benchmark

@@ -166,16 +166,17 @@ public func _bridgeAnythingToObjectiveC<T>(_ x: T) -> AnyObject {
}

@_silgen_name("")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this doing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description there sounds a lot like @usableFromInline, but quite possible @_silgen_name("") has some other effects I'm not aware of.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oof, so we're using the usableFromInline-ness but also the ability to have such a function without a body. I guess that can't change for now.

@moiseev
Copy link
Contributor Author

moiseev commented Nov 10, 2018

@swift-ci Please benchmark

@swift-ci
Copy link
Contributor

Build comment file:

Performance: -O

TEST OLD NEW DELTA RATIO
Improvement
IterateData 1675 1448 -13.6% 1.16x

Code size: -O

TEST OLD NEW DELTA RATIO
Improvement
ObjectiveCNoBridgingStubs.o 8181 8085 -1.2% 1.01x

Performance: -Osize

TEST OLD NEW DELTA RATIO
Improvement
UTF8Decode_InitFromBytes_ascii 584 483 -17.3% 1.21x
IterateData 1550 1358 -12.4% 1.14x

Code size: -Osize

TEST OLD NEW DELTA RATIO
Improvement
ObjectiveCNoBridgingStubs.o 8087 7911 -2.2% 1.02x
ObjectiveCBridging.o 41127 40375 -1.8% 1.02x
How to read the data The tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.

If you see any unexpected regressions, you should consider fixing the
regressions before you merge the PR.

Noise: Sometimes the performance results (not code size!) contain false
alarms. Unexpected regressions which are marked with '(?)' are probably noise.
If you see regressions which you cannot explain you can try to run the
benchmarks again. If regressions still show up, please consult with the
performance team (@eeckstein).

Hardware Overview
  Model Name: Mac Pro
  Model Identifier: MacPro6,1
  Processor Name: 12-Core Intel Xeon E5
  Processor Speed: 2.7 GHz
  Number of Processors: 1
  Total Number of Cores: 12
  L2 Cache (per Core): 256 KB
  L3 Cache: 30 MB
  Memory: 64 GB
--------------

@moiseev
Copy link
Contributor Author

moiseev commented Nov 10, 2018

@swift-ci Please test

@swiftlang swiftlang deleted a comment from swift-ci Nov 10, 2018
@swiftlang swiftlang deleted a comment from swift-ci Nov 10, 2018
@swiftlang swiftlang deleted a comment from swift-ci Nov 10, 2018
@swiftlang swiftlang deleted a comment from swift-ci Nov 10, 2018
@moiseev
Copy link
Contributor Author

moiseev commented Nov 10, 2018

@swift-ci Please test

@swiftlang swiftlang deleted a comment from swift-ci Nov 10, 2018
@swiftlang swiftlang deleted a comment from swift-ci Nov 10, 2018
@moiseev moiseev merged commit 9d0c97e into swiftlang:master Nov 10, 2018
@moiseev moiseev deleted the bridge-inlinable branch November 10, 2018 18:37
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.

3 participants