I had like to optimize the following Matlab code :
x = linspace(-5,5,100);
y = linspace(-5,5,100);
z = linspace(-5,5,100);
[xp,yp,zp] = meshgrid(x,y,z);norm = sqrt(xp.^2+yp.^2+zp.^2);
I improved it a little using realsqrt :
norm_0 = sqrt(xp.^2+yp.^2+zp.^2) 10.106 s 37.0%
norm_1 = realsqrt(xp.^2+yp.^2+zp.^2) 10.100 s 35.0%
Any other ideas ?