Javascript .toUpperCase() vs .toLowerCase() (v6)

Revision 6 of this benchmark created on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

Setup

var allLower = "span";
    var allUpper = "SPAN";
    var temp;
    
    function noop(input) {
      return input;
    }

Test runner

Ready to run.

Testing in
TestOps/sec
lower to upper
allLower.toUpperCase();
ready
upper to upper
allUpper.toUpperCase();
ready
noop
temp = noop(allUpper);
ready

Revisions

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