Lowercase versus variable

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
variable
var text="ZZZdef";
var lowerVersion=text.toLowerCase();
if (lowerVersion=='abcdef' || lowerVersion=='asdfgh' || lowerVersion=='zxcvbn'){

}
ready
lowercase
var text="ZZZdef";
if (text.toLowerCase()=='abcdef' || text.toLowerCase()=='asdfgh' || text.toLowerCase()=='zxcvbn'){

}
ready

Revisions

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