B
Bartc
Richard Heathfield said:Willem said:
Nice code, btw.
Oh, yes - so I set up my version for 1000 iterations, and removed the
to outside the loop, giving me 0.084 real, i.e. less than 100 microseconds
per power calc.
This sounds better than the 8ms/8000us you had earlier reported.
I tried to get some C code up to speed and managed around 60uS per
calculation (three times faster than Willem's). However this used fixed size
int arrays with decimal representation (4 digits per int) for ease of
display.
There is scope for improvement though when there is access to things such as
the 32-bit => 64-bit multiplies of a typical cpu.