3 ms·
> Also never use Math.pow for squaring numbers (used in the distance function) because it is significantly slower... Modern JS engines optimize hot functions a
by fenomas 8y ago
> Also never use Math.pow for squaring numbers (used in the distance function) because it is significantly slower...
Modern JS engines optimize hot functions at runtime - advice like this won't affect actual performance.