corry

exponents...

Discussion created by corry on Jan 20, 2012
Latest reply on Jan 23, 2012 by corry

As usual, working in IL, looking for the best performance I can, what else is new :)

Anyhow, I've run into a situation where I think avoiding exponents will be prohibitivly slow, so I looked at the pow IL instruction, then the ISA for it...

I suppose if I knew what EXP_e was it might make more sense, but it looks like it does some logs, some ors, some muls, and some EXP_e's.  So I take it there is no native pow function on the caymans?  Is it really using ~5 instruction words for Pow?  Thats not horrible, but I have several cases where I think I will receive exponents of less than 5, and all numbers are 24 bits or less, so I would suspect a mul24 mul24 would be faster, but the exponent is arbitrary based on program flow, and conditionals suck, so I think the addition of conditionals for those cases will cause a major slow down, especially in comparison to the ~5 cycles for the pow.

Thats my understanding of what I'm seeing anyways.  Any other suggestions?

Outcomes