Disappointing math performance compared to GDC

Gabor Mezo via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Wed Oct 8 09:26:01 PDT 2014


On a second thought I can see that the main problem is my 
computation functions are not inlined. They are likes of this:

float sigmoid(float value, float alpha) nothrow
{
         return (value * alpha) / (1.0f + nfAbs(value * alpha)); 
// Elliot
}

float sigmoidDeriv(float value, float alpha) nothrow
{
	return alpha * 1.0f / ((1.0f + nfAbs(value * alpha)) * (1.0f + 
nfAbs(value * alpha))); // Elliot
}

float linear(float value, float alpha) nothrow
{
	return nfMin(nfMax(value * alpha, -alpha), alpha);
}

Why those calls are not inlined?? Or vectorized?


More information about the digitalmars-d-ldc mailing list