CodeNewton:
Hello all!
Ive been trying to implement a fast sigmoid funtion with abs and have a major speed problem.
the abs one takes about 500 ns and the exp 600 ns. Why is the abs one so slow? I thought it would be orders of Magnitude faster!

You're using floating point math, obviously without a co-processor. Of course it will be slow.

Can you multiply your variables by some constant, do INTEGER math, then divide the result back. Ints are much faster.

CodeNewton:
the abs one takes about 500 ns and the exp 600 ns.

Uh... 500 nS is 1/2 microsecond or 8 clock cycles. Unlikely any floating-point math is getting done that fast. I suspect the body of your loop is being optimized away because the results aren't used (at least not the first 999 results). Try declaring 'result' and 'in' as 'volatile' so the optimizer gets the hint not to throw your code away.