# Equality Comparisons (v4)

## Setup

``````const numbers = [];
const booleans = [];
const strings = [];
const coercion = [];
const mix = [];
const mixSelector = [numbers, booleans, strings]

for(let i=0; i<1000; i++) {
numbers.push(i);
booleans.push(!!i%2);
strings.push('' + i);
coercion.push({valueOf: () => "" + i})
const array = mixSelector[i%mixSelector.length];
mix.push(array[i]);
}``````

## Test runner

Testing in
TestOps/sec
numbers ==
``````let sum = false;
for (i = 0; i< numbers.length; i++) {
sum = numbers[i] == -1 || sum;
}``````
numbers ===
``````let sum = false;
for (i = 0; i< numbers.length; i++) {
sum = numbers[i] === -1 || sum;
}``````
strings ==
``````let sum = false;
for (i = 0; i< strings.length; i++) {
sum = strings[i] == -1 || sum;
}``````
strings ===
``````let sum = false;
for (i = 0; i< strings.length; i++) {
sum = strings[i] === -1 || sum;
}``````
mix ==
``````let sum = false;
for (i = 0; i< mix.length; i++) {
sum = mix[i] == -1 || sum;
}``````
mix ===
``````let sum = false;
for (i = 0; i< mix.length; i++) {
sum = mix[i] === -1 || sum;
}``````
coercion ===
``````let sum = false;
for (i = 0; i< coercion.length; i++) {
sum = coercion[i] === -1 || sum;
}``````
``````let sum = false;