Re: POWER()
- Posted by Ralf Nieuwenhuijsen <nieuwen at XS4ALL.NL> Sep 20, 1998
- 585 views
>>It seems that power(x,2) is not quite right as far as speed. >>It says in library.doc that powers of 2 are calculated very >>efficiently. >Didn't they mean power(2,x) ? :) No, the example they gave was x*x And RDS has optimized the 2^n type of expressions, prolly using asm-shifting. No calculation involved. However, x*x can never be faster than power (x, 2) .. the preproccesor could optimize for this ... Ralf Nieuwenhuijsen nieuwen at xs4all.nl