ecometer

Use primitive operations

(Development)
#31

Using methods for basic operations uses additional system resources. The interpreter must first resolve the objects and then the methods just to run the simplest of operations.
Therefore, avoid them as much as possible.

Instead of:

var min = Math.min(a,b);
A.push(v);

write:

var min = a < b ? a : b;
A[A.length] = v;
This best practice should only be applied if it is coherent with your project's specifications.
Under CC-By-NX-SA license