-
Notifications
You must be signed in to change notification settings - Fork 1
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
Simpler power(_:)
function?
#153
Comments
Some values may benefit from static protocol requirements. |
Looking at the assembly output of a similar Edit: But this is only in |
After some experiments in (#71), the difference between arbitrary integer
a.power(b).times(c)
anda.power(b, coefficient: c)
appears small when the initial power is without heap allocation. The former is simpler to test and reason about, so I prefer it. There are at least two ways to prevent this heap allocation:(A)
adding a static protocol requirement or(B)
waiting for a small-integer optimization (#44) that puts it on the stack.The text was updated successfully, but these errors were encountered: