Uncurry This

JavaScript performance comparison

Test case created by bmeck

Preparation code


      
      <script>
Benchmark.prototype.setup = function() {
  'use strict';
  const charCodeAt = String.prototype.charCodeAt;
  const cachedCall = Function.prototype.call.bind(
    Function.prototype.call,
    charCodeAt
  );
  const cachedReflectList = Reflect.apply.bind(
    null,
    charCodeAt
  );
  const cachedReflectRest = (that, ...args) => cachedReflectList(that, args);
  const cachedCallCall = Function.prototype.call.bind(
    Function.prototype.call,
    Function.prototype.call
  );

};
</script>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
uncached
'use strict';
'hello'.charCodeAt(1);
pending…
function.call.bind
'use strict';
cachedCall('hello', 1);
pending…
Reflect.apply list
'use strict';
cachedReflectList('hello', [1]);
pending…
Bound Function call call
cachedCallCall(charCodeAt, 'hello', 1);
pending…
Reflect.apply rest
'use strict';
cachedReflectRest('hello', 1);
pending…

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

Compare results of other browsers

0 Comments