Closed twhb closed 6 years ago
Performance optimization. When, for example, value === min, only two comparisons are run: min <= max and value <= min. Before, three comparisons were run: min < max, value < min, and value > max. Same reasoning for all other insertions of =.
value === min
min <= max
value <= min
min < max
value < min
value > max
=
Performance optimization. When, for example,
value === min
, only two comparisons are run:min <= max
andvalue <= min
. Before, three comparisons were run:min < max
,value < min
, andvalue > max
. Same reasoning for all other insertions of=
.