Empty String Comparison Performance (v2)

Revision 2 of this benchmark created on


Setup

const emptyString = ``;
const isFalse = [];

Teardown

if (isFalse.length !== 0) {
	console.error(`!!!!`, isFalse);
};

Test runner

Ready to run.

Testing in
TestOps/sec
string ===
if (!(emptyString === ``)) {
	isFalse.push(false);
};
ready
string.length
if (!(emptyString.length === 0)) {
	isFalse.push(false);
};
ready

Revisions

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