Tests:
  • splice

    AخA
     
    function extractedObj(array){
      var splicedObj = [];
      for(var i = array.length-1; i >= 0; i--){
        if (typeof array[i] === "object" && array[i] !== null){
          splicedObj.push(array[i]);
          array.splice(i, 1);
        }
      }
      return splicedObj;
    };
  • filter

     
    function filtObj(element) {
      return element && typeof element === "object";
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    splice
    filter

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 8 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.59 Safari/537.36
Chrome 54 on Mac OS X 10.11.4
View result in a separate tab
Test name Executions per second
splice 69306200.0 Ops/sec
filter 69003336.0 Ops/sec