Skip to content
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

[SR-9426] Calculator inlining #51890

Closed
milseman mannequin opened this issue Dec 6, 2018 · 3 comments
Closed

[SR-9426] Calculator inlining #51890

milseman mannequin opened this issue Dec 6, 2018 · 3 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself performance SILOptimizer Area → compiler: SIL optimization passes

Comments

@milseman
Copy link
Mannequin

milseman mannequin commented Dec 6, 2018

Previous ID SR-9426
Radar None
Original Reporter @milseman
Type Bug
Status Resolved
Resolution Duplicate
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, Optimizer, Performance
Assignee @eeckstein
Priority Medium

md5: 3f39af843a7c6094e1e2b198be5c8d2b

Issue Description:

The Calculator benchmark, on 4.2, would choose not to inline String equality. Even if I drop the `@inline(__always)`, on master's `_stringCompare`, it will still be inlined. This results in an extra branch surrounding every equality call, which adds up for long switch cases (where bitwise equality would only happen 1/N on average).

What is the best way for me to address this? Should there be a custom annotation here?

@milseman
Copy link
Mannequin Author

milseman mannequin commented Dec 6, 2018

CC @atrick @eeckstein @gottesmm

@milseman
Copy link
Mannequin Author

milseman mannequin commented Dec 7, 2018

Talked with Erik, and we're going with the long-term solution here: https://bugs.swift.org/browse/SR-9440

@milseman
Copy link
Mannequin Author

milseman mannequin commented Dec 7, 2018

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added SILOptimizer Area → compiler: SIL optimization passes and removed Optimizer labels Nov 3, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself performance SILOptimizer Area → compiler: SIL optimization passes
Projects
None yet
Development

No branches or pull requests

1 participant