Array.Includes vs Strict Comparison

Benchmark created on


Setup

const mockKey = 1;
const mockScale = 2;

Test runner

Ready to run.

Testing in
TestOps/sec
Array.Includes
const keyTest = [undefined].includes(mockKey);
const scaleTest = [undefined].includes(mockScale);
ready
Strict Comparison
const keyTest = mockKey !== undefined;
const scaleTest = mockScale !== undefined;
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.