4 ms·
A factory function will also give the objects it returns the same hidden class, resulting in monomorphic code that can be optimized. function vec3 (x, y, z
by pygy_ 8y ago
A factory function will also give the objects it returns the same hidden class, resulting in monomorphic code that can be optimized.
function vec3 (x, y, z) { return {x, y, z} }