Speeding up Math calculations in Java
Posted
by Simon
on Stack Overflow
See other posts from Stack Overflow
or by Simon
Published on 2010-05-22T11:03:24Z
Indexed on
2010/05/22
11:10 UTC
Read the original article
Hit count: 169
java
|mathematical-optimization
I have a neural network written in Java which uses a sigmoid transfer function defined as follows:
private static double sigmoid(double x)
{
return 1 / (1 + Math.exp(-x));
}
and this is called many times during training and computation using the network. Is there any way of speeding this up? It's not that it's slow, it's just that it is used a lot, so a small optimisation here would be a big overall gain.
© Stack Overflow or respective owner