I\'m not that great with maths and C# doesn\'t seem to provide a power-of function so I was wondering if anyone knows how I would run a calculation like this:
Do not use Math.Pow
Math.Pow
When i use
for (int i = 0; i < 10e7; i++) { var x3 = x * x * x; var y3 = y * y * y; }
It only takes 230 ms whereas the following takes incredible 7050 ms:
for (int i = 0; i < 10e7; i++) { var x3 = Math.Pow(x, 3); var y3 = Math.Pow(x, 3); }