Replace Math.sin with an approximation to see if it is faster.