Script Preparation code:
x
 
function isJsArray(obj_0) {
    var tmp0_unsafeCast_0 = Array.isArray(obj_0);
    return tmp0_unsafeCast_0;
  }
function isArray(obj_0) {
    var tmp;
    if (isJsArray(obj_0)) {
      tmp = !obj_0.$type$;
    } else {
      tmp = false;
    }
    return tmp;
  }
function arrayConcat(args) {
    var len = args.length;
    var tmp0_unsafeCast_0 = Array(len);
    var typed = tmp0_unsafeCast_0;
    var inductionVariable = 0;
    var last = len - 1 | 0;
    if (inductionVariable <= last)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var arr = args[i];
        if (!(!(arr == null) ? isArray(arr) : false)) {
          typed[i] = [].slice.call(arr);
        } else {
          {
            typed[i] = arr;
          }
        }
      }
       while (!(i === last));
    return [].concat.apply([], typed);
  }
var args = (new Int32Array(10000)).map(_ => Math.random(1000000));
Tests:
  • legacy

     
    arrayConcat([0, 1], args)
  • ir

     
    [0, 1].concat([].slice.call(args))
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    legacy
    ir

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:86.0) Gecko/20100101 Firefox/86.0
Firefox 86 on Mac OS X 10.16
View result in a separate tab
Test name Executions per second
legacy 2435581.5 Ops/sec
ir 1698.8 Ops/sec