polymorphic vs monomorphic (v2)

Revision 2 of this benchmark created on


Setup

function mono(arg1, arg2, arg3){
      return arg1 + arg2 + arg3;
    }
    
    function poly(arg1, arg2, arg3){
      return arg1 + arg2 + arg3;
    }

Test runner

Ready to run.

Testing in
TestOps/sec
monomorphic
mono('str', 1, 'a');
mono('str', 2, 'b');
ready
polymorphic
poly('str', 1, 'a');
poly('str', 'b', 2);
ready

Revisions

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