[swift-users] Why no unsafeRemainder(dividingBy: Self) in FixedWidthInteger?
jens at bitcycle.com
Sun Oct 29 03:12:56 CDT 2017
I have some integer processing code that is called very intensively and
need to be as fast as possible, I therefore use &+ &- &/ &* instead of + -
/ * which results in a significant speedup.
However, I also need to use % and I noticed that there is no &% ...
That is, FixedWidthInteger has:
func remainderReportingOverflow(dividingBy: Self)
but there is no:
func unsafeRemainder(dividingBy: Self)
which is different from the other …ReportingOverflow-unsafe…-pairs:
func dividedReportingOverflow(by: Self)
func multipliedReportingOverflow(by: Self)
func unsafeMultiplied(by: Self)
func unsafeDivided(by: Self)
Is this intentional and if so why?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-users