by raphlinus · 6y ago · 0 comments
Not just small constant powers either. I tried .powi(1000000) and it compiled into a sequence of 25 vmulss instructions.
I suspect then that defining it at x*x is just just because it's easier to type than x.powi(2).