2 ms·
It would certainly be a violation, as the algorithm to evaluate == is rigorously outlined in the language specification, specifically here: https://www.ecma-int
by TheRealPomax 9y ago
It would certainly be a violation, as the algorithm to evaluate == is rigorously outlined in the language specification, specifically here: https://www.ecma-international.org/ecma-262/8.0/index.html#sec-testing-and-comparison-operations https://www.ecma-international.org/ecma-262/8.0/index.html#s...
This algorithm does not describe an optional caching step to speed up/short-circuit the procedure, and so the optimization you describe would lead to non-spec-compliant behaviour.