You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some low-level mathematical operations (e.g. cryptographic applications) it is useful to have a bitwise “rotate” operation. It would be nice if Swift would expose this operation directly, especially as it would be straightforward for Swift to use [the LLVM intrinsics| https://reviews.llvm.org/D50924] that enable optimised codegen on platforms that have appropriate instructions for this task.
As a hypothetical enhancement to this project the rotate operation could even be available as a protocol hook on FixedWidthInteger, with a default implementation available in terms of left shift, right shift, and bitwise or. This would likely be unnecessary, and rarely useful, but not entirely useless.
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: 3b5020922338e97047de7ca9dc03baab
Issue Description:
In some low-level mathematical operations (e.g. cryptographic applications) it is useful to have a bitwise “rotate” operation. It would be nice if Swift would expose this operation directly, especially as it would be straightforward for Swift to use [the LLVM intrinsics| https://reviews.llvm.org/D50924] that enable optimised codegen on platforms that have appropriate instructions for this task.
As a hypothetical enhancement to this project the rotate operation could even be available as a protocol hook on FixedWidthInteger, with a default implementation available in terms of left shift, right shift, and bitwise or. This would likely be unnecessary, and rarely useful, but not entirely useless.
The text was updated successfully, but these errors were encountered: