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-13131] Improve fallback paths for concrete FP inits from BinaryInteger #55577

Open
stephentyrone opened this issue Jul 1, 2020 · 2 comments
Labels
improvement standard library Area: Standard library umbrella

Comments

@stephentyrone
Copy link
Member

Previous ID SR-13131
Radar rdar://problem/64995426
Original Reporter @stephentyrone
Type Improvement
Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Improvement
Assignee None
Priority Medium

md5: aea45ce70de61f5523749309cce9a353

Issue Description:

For integer types larger than a word, the currently fall back on using the generic _convert operation. But we can do significantly better for Float16, Float, and Double; instead of going to a full soft-float computation, we should pull out the high-order 16, 32, or 64 bits of the integer, or 1 into the low bit if any set bits were lost, and then do a word convert (or two words, in the case of Double on 32b systems).

@stephentyrone
Copy link
Member Author

@swift-ci create

@stephentyrone
Copy link
Member Author

We could do better for Float80 as well, but that's somewhat less interesting.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement standard library Area: Standard library umbrella
Projects
None yet
Development

No branches or pull requests

1 participant