-
Notifications
You must be signed in to change notification settings - Fork 84
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
Mark public generic async methods inlinable #426
Conversation
Motivation: Mark generic async methods inlinable where possible to improve performance. Modifications: Multiple methods marked `@inlinable` Result: Performance increase
struct MultiplexerAbstractChannel { | ||
private(set) var baseChannel: HTTP2StreamChannel | ||
@usableFromInline var _baseChannel: HTTP2StreamChannel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be mistaken but I think you can apply @usableFromInline
to a private(set) var
(but not a private var
)
} | ||
} | ||
|
||
extension MultiplexerAbstractChannel: Equatable { | ||
@usableFromInline |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@usableFromInline | |
@inlinable |
} | ||
} | ||
|
||
extension MultiplexerAbstractChannel: Hashable { | ||
@usableFromInline |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@usableFromInline | |
@inlinable |
Mark public generic async methods inlinable
Motivation:
Mark generic async methods inlinable where possible to improve performance.
Modifications:
Multiple methods marked
@inlinable
Result:
Performance increase