deep cloning of objects (v11)

Revision 11 of this benchmark created on


Description

Testing only DEEP cloning of objects. Minimum requirement is to pass 'everything that can be JSONed' test. To reduce the impact of the validation test, several runs are done in each test round. /ORC

Preparation HTML

<script src="http://code.jquery.com/jquery-1.8.0.js" type="text/javascript"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/1.3.1/lodash.min.js"></script>
<script>var lodash = _.noConflict();</script>

<script>
function deepClone1(obj) {
  return JSON.parse(JSON.stringify(obj));
}

function deepClone2(obj) {
  var i, ret, ret2;
  if (typeof obj === "object") {
    if (obj === null) return obj;
    if (Object.prototype.toString.call(obj) === "[object Array]") {
      ret = [];
      for (i = 0; i < obj.length; i++) {
        if (typeof obj[i] === "object") {
          ret2 = deepClone2(obj[i]);
        } else {
          ret2 = obj[i];
        }
        ret.push(ret2);
      }
    } else {
      ret = {};
      for (i in obj) {
        if (obj.hasOwnProperty(i)) {
          if (typeof(obj[i] === "object")) {
            ret2 = deepClone2(obj[i]);
          } else {
            ret2 = obj[i];
          }
          ret[i] = ret2;
        }
      }
    }
  } else {
    ret = obj;
  }

  return ret;
}

// comes from: http://jsperf.com/cloning-an-object/23
function deepClone3(obj) {
    var target = {};
    for (var i in obj) {
      if (typeof(obj) === 'object') {
        target[i] = deepClone3(obj[i]);
      }
      else {
        target[i] = obj[i];
      }
    }
    return target;
  }

// adapted from: http://jsperf.com/cloning-an-object/23
function deepClone4(obj) {
   return lodash.clone(obj, /*deep=*/true);
}

// adapted from: http://jsperf.com/cloning-an-object/23
function deepClone5(obj) {
   return jQuery.extend(/*deep=*/true, {}, obj);
}

// comes from: http://jsperf.com/cloning-an-object/23
function deepClone6(obj) {
   return Object.clone(obj);
}

// adapted/reduced from: http://jsperf.com/structured-clone-objects/2 and https://developer.mozilla.org/en-US/docs/DOM/The_structured_clone_algorithm
function deepClone7(oToBeCloned) {
  if (oToBeCloned === null || !(oToBeCloned instanceof Object)) { return oToBeCloned; }
  var oClone, fConstr = oToBeCloned.constructor;
  oClone = new fConstr();
  for (var sProp in oToBeCloned) { oClone[sProp] = deepClone7(oToBeCloned[sProp]); }
  return oClone;
};


// ******************

// comes from: http://jsperf.com/cloning-an-object/23
if(typeof Object.defineProperties != 'undefined') {
  Object.defineProperties(Object, {
    'extend': {
      'configurable': true,
      'enumerable': false,
      'value': function extend(what, wit) {
        var extObj, witKeys = Object.keys(wit);

        extObj = Object.keys(what).length ? Object.clone(what) : {};

        witKeys.forEach(function(key) {
          Object.defineProperty(extObj, key, Object.getOwnPropertyDescriptor(wit, key));
        });

        return extObj;
      },
      'writable': true
    },
    'clone': {
      'configurable': true,
      'enumerable': false,
      'value': function clone(obj) {
        return Object.extend({}, obj);
      },
      'writable': true
    }
  });
}
// ******************

// ensure that the deep-clone is actually accurate
function compareObjs(obj1, obj2) {
  // snapshot how `obj1` currently looks
  var orig = JSON.stringify(obj1);

  // test if `obj2` really was a clone of `obj1`
  if (orig !== JSON.stringify(obj2)) {
    throw new Error("failed test 1");
  }

  // do some mutations to `obj2` clone
  obj2[0].firstName = "3";
  // check that `obj1` wasn't affected
  if (orig !== JSON.stringify(obj1)) {
    throw new Error("failed test 2");
  }
}







// Generated by LiveScript 1.2.0
(function(){
    var __toStr = {}.toString
      , __owns = {}.hasOwnProperty
      , isArray_slowFallback = Array.isArray || function(obj) {
            return typeof obj.unshift !== 'undefined' && __toStr.call(obj) === '[object Array]';
      }
      , chickenOutCounter
      , chickenOutThreshold
      , nop = function(){}
      , innerFn = deepCloneWithBelts_inner
      //, friendPrototypesObj = []
      //, friendPrototypesArr = []
      ;

    deepCloneNo_Belt = function(obj) {
        if (typeof obj !== 'object')
            return obj;
        else
            return deepCloneNoBelt_inner(obj);
    };

    cpo = deepClone_Safe = function(obj, refRecursionSafe) {
        refRecursionSafe == null && (refRecursionSafe = 0);
        if (typeof obj !== 'object')
            return obj;

        else if (refRecursionSafe === true)
            return createReferenceRecursionAwareInner()(obj);

        else if (refRecursionSafe === 0)
            return deepCloneNoBelt_inner(obj);

        else {
            chickenOutCounter = 0;
            chickenOutThreshold = typeof refRecursionSafe === 'number' ? refRecursionSafe : 10000;
            out = innerFn(obj);

            // Was there a bail out because of suspected reference recursion?
            if (innerFn === nop) {
                innerFn = deepCloneWithBelts_inner; // reset from bail-out function
                out = createReferenceRecursionAwareInner()(obj);
            }

            return out;
        }
    };

    function deepCloneNoBelt_inner(obj) {
        // Null?
        if (obj === null)
            return null;

        var ctor = obj.constructor;

        // A pure object?
        if (ctor === Object) {
            var k, v, reto = {};
            for (k in obj)
                if (__owns.call(obj, k))
                    reto[k] = typeof (v = obj[k]) === 'object' ? deepCloneNoBelt_inner(v) : v;
            return reto;
        }
        // Array?
        if (ctor === Array || isArray_slowFallback(obj)) {
            var i, v, len = obj.length, reto = new Array(len);
            for (i = 0; i < len; ++i)
                reto[i] = typeof (v = obj[i]) === 'object' ? deepCloneNoBelt_inner(v) : v;
            return reto;
        }
        // Fast RegExp & Date checks first
        if (ctor === Date || ctor === RegExp)
            return obj;

        // Slower Date-check
        if (typeof obj.getYear !== 'undefined' && __toStr.call(obj)=== '[object Date]')
            return obj;

        // Slower RegExp-check
        if (typeof obj.exec !== 'undefined' && typeof obj.match !== 'undefined')
            return obj;

        if (__toStr.call(obj === '[object Object]')) {
            var k, v, reto = {};
            for (k in obj)
                if (__owns.call(obj, k))
                    reto[k] = typeof (v = obj[k]) === 'object' ? deepCloneNoBelt_inner(v) : v;
            return reto;
        }
        return obj;
    }

    function deepCloneWithBelts_inner(obj) {
        if (++chickenOutCounter > chickenOutThreshold) {
            innerFn = nop;
            return null;
        }
        if (obj === null)
            return null;

        var ctor = obj.constructor;

        if (ctor === Object) {
            var k, v, reto = {};
            for (k in obj)
                if (__owns.call(obj, k))
                    reto[k] = typeof (v = obj[k]) === 'object' ? innerFn(v) : v;
            return reto;
        }
        //var isAnArray = false;
        //if (ctor === Array) {
        //    isAnArray = true;
        //} else if (friendPrototypesArr.indexOf(ctor) != -1) {
        //    isAnArray = true;
        //} else if (isArray_slowFallback(obj)) {
        //    isAnArray = true;
        //    friendPrototypesArr.push(ctor);
        //}
        if (ctor === Array || isArray_slowFallback(obj)) {
            var i, v, len = obj.length, reto = new Array(len);
            for (i = 0; i < len; ++i) {
                reto[i] = typeof (v = obj[i]) === 'object' ? innerFn(v) : v;
            }
            return reto;
        }
        if (ctor === Date || ctor === RegExp) {
            return obj;
        }
        // Slower RegExp-check
        if (typeof obj.exec !== 'undefined' && typeof obj.match !== 'undefined')
            return obj;

        // Slower Date-check
        if (typeof obj.getYear !== 'undefined' && __toStr.call(obj)=== '[object Date]')
            return obj;

        //if (friendPrototypesObj.indexOf(ctor ) != -1 || __toStr.call(obj === '[object Object]')) {
        if (__toStr.call(obj === '[object Object]')) {
            //friendPrototypesObj.push(ctor);
            var k, v, reto = {};
            for (k in obj)
                if (__owns.call(obj, k))
                    reto[k] = typeof (v = obj[k]) === 'object' ? innerFn(v) : v;
            return reto;
        }
        return obj;
    }

    function createReferenceRecursionAwareInner() {
        var seen = []
          , mapArr = []
          ;

        function _cpo_inner(obj){
            var i;

            // Reference recursion?
            if ((i = seen.indexOf(obj)) !== -1)
                return mapArr[i];

            // Null?
            if (obj === null)
                return null;

            var ctor = obj.constructor
              , foundAnObj = (ctor === Object);

            // Not a pure object afawn? Check for other stuff
            if (!foundAnObj) {
                // Array?
                if (ctor === Array || isArray_slowFallback(obj)) {
                    var v, len = obj.length, reto = new Array(len);
                    mapArr.push(reto);
                    seen.push(obj);
                    for (i = 0; i < len; ++i)
                        reto[i] = typeof (v = obj[i]) === 'object' ? _cpo_inner(v) : v;
                    return reto;
                }
                // Fast RegExp & Date checks first
                if (ctor === Date || ctor === RegExp)
                    return obj;

                // Slower RegExp-check
                if (typeof obj.exec !== 'undefined' && typeof obj.match !== 'undefined')
                    return obj;

                // Slower Date-check
                if (typeof obj.getYear !== 'undefined' && __toStr.call(obj)=== '[object Date]')
                    return obj;
            }
            // Lastly and most expensively, if foundAnObj is not already true,
            // we do the hideous toString check. /ORC
            if (foundAnObj || __toStr.call(obj) === '[object Object]') {
                var k, v, reto = {};
                mapArr.push(reto);
                seen.push(obj);
                for (k in obj)
                    if (__owns.call(obj, k))
                        reto[k] = typeof (v = obj[k]) === 'object' ? _cpo_inner(v) : v;
                return reto;
            }
            return obj;
        };
        return _cpo_inner;
    }

}.call(this));




</script>

Setup

var a = [
      {id: 1, name: {first: 'Joe', last: 'Fabiano'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Joe.Fabiano@ex.com'},
      {id: 2, name: {first: 'Fred', last: 'Wecler'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Fred.Wecler@ex.com'},
      {id: 3, name: {first: 'Steve', last: 'Wilson'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Steve.Wilson@ex.com'},
      {id: 4, name: {first: 'Maria', last: 'Fernandez'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'M.Fernandez@ex.com'},
      {id: 5, name: {first: 'Pierre', last: 'Barbault'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Pierre.Barbault@ex.com'},
      {id: 6, name: {first: 'Nancy', last: 'Moore'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Nancy.Moore@ex.com'},
      {id: 7, name: {first: 'Barbara', last: 'MacDonald'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'B.MacDonald@ex.com'},
      {id: 8, name: {first: 'Wilma', last: 'Williams'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Wilma.Williams@ex.com'},
      {id: 9, name: {first: 'Sasha', last: 'Silver'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Sasha.Silver@ex.com'},
      {id: 10, name: {first: 'Don', last: 'Pérignon'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Don.Pérignon@ex.com'},
      {id: 11, name: {first: 'Aaron', last: 'Kinley'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Aaron.Kinley@ex.com'},
      {id: 2, name: {first: 'Fred', last: 'Wecler'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Fred.Wecler@ex.com'},
      {id: 3, name: {first: 'Steve', last: 'Wilson'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Steve.Wilson@ex.com'},
      {id: 4, name: {first: 'Maria', last: 'Fernandez'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'M.Fernandez@ex.com'},
      {id: 5, name: {first: 'Pierre', last: 'Barbault'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Pierre.Barbault@ex.com'},
      {id: 6, name: {first: 'Nancy', last: 'Moore'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Nancy.Moore@ex.com'},
      {id: 7, name: {first: 'Barbara', last: 'MacDonald'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'B.MacDonald@ex.com'},
      {id: 8, name: {first: 'Wilma', last: 'Williams'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Wilma.Williams@ex.com'},
      {id: 9, name: {first: 'Sasha', last: 'Silver'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Sasha.Silver@ex.com'},
      {id: 10, name: {first: 'Don', last: 'Pérignon'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Don.Pérignon@ex.com'},
      {id: 11, name: {first: 'Aaron', last: 'Kinley'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Aaron.Kinley@ex.com'},
      {id: 2, name: {first: 'Fred', last: 'Wecler'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Fred.Wecler@ex.com'},
      {id: 3, name: {first: 'Steve', last: 'Wilson'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Steve.Wilson@ex.com'},
      {id: 4, name: {first: 'Maria', last: 'Fernandez'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'M.Fernandez@ex.com'},
      {id: 5, name: {first: 'Pierre', last: 'Barbault'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Pierre.Barbault@ex.com'},
      {id: 6, name: {first: 'Nancy', last: 'Moore'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Nancy.Moore@ex.com'},
      {id: 7, name: {first: 'Barbara', last: 'MacDonald'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'B.MacDonald@ex.com'},
      {id: 8, name: {first: 'Wilma', last: 'Williams'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Wilma.Williams@ex.com'},
      {id: 9, name: {first: 'Sasha', last: 'Silver'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Sasha.Silver@ex.com'},
      {id: 10, name: {first: 'Don', last: 'Pérignon'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Don.Pérignon@ex.com'},
      {id: 11, name: {first: 'Aaron', last: 'Kinley'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Aaron.Kinley@ex.com'},
      {id: 2, name: {first: 'Fred', last: 'Wecler'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Fred.Wecler@ex.com'},
      {id: 3, name: {first: 'Steve', last: 'Wilson'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Steve.Wilson@ex.com'},
      {id: 4, name: {first: 'Maria', last: 'Fernandez'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'M.Fernandez@ex.com'},
      {id: 5, name: {first: 'Pierre', last: 'Barbault'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Pierre.Barbault@ex.com'},
      {id: 6, name: {first: 'Nancy', last: 'Moore'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Nancy.Moore@ex.com'},
      {id: 7, name: {first: 'Barbara', last: 'MacDonald'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'B.MacDonald@ex.com'},
      {id: 8, name: {first: 'Wilma', last: 'Williams'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Wilma.Williams@ex.com'},
      {id: 9, name: {first: 'Sasha', last: 'Silver'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Sasha.Silver@ex.com'},
      {id: 10, name: {first: 'Don', last: 'Pérignon'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Don.Pérignon@ex.com'},
      {id: 11, name: {first: 'Aaron', last: 'Kinley'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Aaron.Kinley@ex.com'},
      {id: 2, name: {first: 'Fred', last: 'Wecler'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Fred.Wecler@ex.com'},
      {id: 3, name: {first: 'Steve', last: 'Wilson'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Steve.Wilson@ex.com'},
      {id: 4, name: {first: 'Maria', last: 'Fernandez'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'M.Fernandez@ex.com'},
      {id: 5, name: {first: 'Pierre', last: 'Barbault'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Pierre.Barbault@ex.com'},
      {id: 6, name: {first: 'Nancy', last: 'Moore'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Nancy.Moore@ex.com'},
      {id: 7, name: {first: 'Barbara', last: 'MacDonald'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'B.MacDonald@ex.com'},
      {id: 8, name: {first: 'Wilma', last: 'Williams'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Wilma.Williams@ex.com'},
      {id: 9, name: {first: 'Sasha', last: 'Silver'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Sasha.Silver@ex.com'},
      {id: 10, name: {first: 'Don', last: 'Pérignon'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Don.Pérignon@ex.com'},
      {id: 11, name: {first: 'Aaron', last: 'Kinley'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Aaron.Kinley@ex.com'},
      {id: 2, name: {first: 'Fred', last: 'Wecler'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Fred.Wecler@ex.com'},
      {id: 3, name: {first: 'Steve', last: 'Wilson'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Steve.Wilson@ex.com'},
      {id: 4, name: {first: 'Maria', last: 'Fernandez'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'M.Fernandez@ex.com'},
      {id: 5, name: {first: 'Pierre', last: 'Barbault'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Pierre.Barbault@ex.com'},
      {id: 6, name: {first: 'Nancy', last: 'Moore'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Nancy.Moore@ex.com'},
      {id: 7, name: {first: 'Barbara', last: 'MacDonald'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'B.MacDonald@ex.com'},
      {id: 8, name: {first: 'Wilma', last: 'Williams'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Wilma.Williams@ex.com'},
      {id: 9, name: {first: 'Sasha', last: 'Silver'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Sasha.Silver@ex.com'},
      {id: 10, name: {first: 'Don', last: 'Pérignon'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Don.Pérignon@ex.com'},
      {id: 11, name: {first: 'Aaron', last: 'Kinley'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Aaron.Kinley@ex.com'},
      {id: 2, name: {first: 'Fred', last: 'Wecler'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Fred.Wecler@ex.com'},
      {id: 3, name: {first: 'Steve', last: 'Wilson'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Steve.Wilson@ex.com'},
      {id: 4, name: {first: 'Maria', last: 'Fernandez'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'M.Fernandez@ex.com'},
      {id: 5, name: {first: 'Pierre', last: 'Barbault'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Pierre.Barbault@ex.com'},
      {id: 6, name: {first: 'Nancy', last: 'Moore'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Nancy.Moore@ex.com'},
      {id: 7, name: {first: 'Barbara', last: 'MacDonald'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'B.MacDonald@ex.com'},
      {id: 8, name: {first: 'Wilma', last: 'Williams'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Wilma.Williams@ex.com'},
      {id: 9, name: {first: 'Sasha', last: 'Silver'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Sasha.Silver@ex.com'},
      {id: 10, name: {first: 'Don', last: 'Pérignon'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Don.Pérignon@ex.com'},
      {id: 11, name: {first: 'Aaron', last: 'Kinley'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Aaron.Kinley@ex.com'},
      {id: 2, name: {first: 'Fred', last: 'Wecler'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Fred.Wecler@ex.com'},
      {id: 3, name: {first: 'Steve', last: 'Wilson'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Steve.Wilson@ex.com'},
      {id: 4, name: {first: 'Maria', last: 'Fernandez'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'M.Fernandez@ex.com'},
      {id: 5, name: {first: 'Pierre', last: 'Barbault'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Pierre.Barbault@ex.com'},
      {id: 6, name: {first: 'Nancy', last: 'Moore'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Nancy.Moore@ex.com'},
      {id: 7, name: {first: 'Barbara', last: 'MacDonald'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'B.MacDonald@ex.com'},
      {id: 8, name: {first: 'Wilma', last: 'Williams'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Wilma.Williams@ex.com'},
      {id: 9, name: {first: 'Sasha', last: 'Silver'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Sasha.Silver@ex.com'},
      {id: 10, name: {first: 'Don', last: 'Pérignon'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Don.Pérignon@ex.com'},
      {id: 11, name: {first: 'Aaron', last: 'Kinley'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Aaron.Kinley@ex.com'},
      {id: 2, name: {first: 'Fred', last: 'Wecler'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Fred.Wecler@ex.com'},
      {id: 3, name: {first: 'Steve', last: 'Wilson'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Steve.Wilson@ex.com'},
      {id: 4, name: {first: 'Maria', last: 'Fernandez'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'M.Fernandez@ex.com'},
      {id: 5, name: {first: 'Pierre', last: 'Barbault'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Pierre.Barbault@ex.com'},
      {id: 6, name: {first: 'Nancy', last: 'Moore'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Nancy.Moore@ex.com'},
      {id: 7, name: {first: 'Barbara', last: 'MacDonald'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'B.MacDonald@ex.com'},
      {id: 8, name: {first: 'Wilma', last: 'Williams'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Wilma.Williams@ex.com'},
      {id: 9, name: {first: 'Sasha', last: 'Silver'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Sasha.Silver@ex.com'},
      {id: 10, name: {first: 'Don', last: 'Pérignon'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Don.Pérignon@ex.com'},
      {id: 11, name: {first: 'Aaron', last: 'Kinley'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Aaron.Kinley@ex.com'},
      {id: 2, name: {first: 'Fred', last: 'Wecler'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Fred.Wecler@ex.com'},
      {id: 3, name: {first: 'Steve', last: 'Wilson'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Steve.Wilson@ex.com'},
      {id: 4, name: {first: 'Maria', last: 'Fernandez'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'M.Fernandez@ex.com'},
      {id: 5, name: {first: 'Pierre', last: 'Barbault'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Pierre.Barbault@ex.com'},
      {id: 6, name: {first: 'Nancy', last: 'Moore'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Nancy.Moore@ex.com'},
      {id: 7, name: {first: 'Barbara', last: 'MacDonald'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'B.MacDonald@ex.com'},
      {id: 8, name: {first: 'Wilma', last: 'Williams'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Wilma.Williams@ex.com'},
      {id: 9, name: {first: 'Sasha', last: 'Silver'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Sasha.Silver@ex.com'},
      {id: 10, name: {first: 'Don', last: 'Pérignon'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Don.Pérignon@ex.com'},
      {id: 11, name: {first: 'Aaron', last: 'Kinley'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Aaron.Kinley@ex.com'},
      {id: 2, name: {first: 'Fred', last: 'Wecler'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Fred.Wecler@ex.com'},
      {id: 3, name: {first: 'Steve', last: 'Wilson'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Steve.Wilson@ex.com'},
      {id: 4, name: {first: 'Maria', last: 'Fernandez'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'M.Fernandez@ex.com'},
      {id: 5, name: {first: 'Pierre', last: 'Barbault'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Pierre.Barbault@ex.com'},
      {id: 6, name: {first: 'Nancy', last: 'Moore'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Nancy.Moore@ex.com'},
      {id: 7, name: {first: 'Barbara', last: 'MacDonald'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'B.MacDonald@ex.com'},
      {id: 8, name: {first: 'Wilma', last: 'Williams'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Wilma.Williams@ex.com'},
      {id: 9, name: {first: 'Sasha', last: 'Silver'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Sasha.Silver@ex.com'},
      {id: 10, name: {first: 'Don', last: 'Pérignon'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Don.Pérignon@ex.com'},
      {id: 11, name: {first: 'Aaron', last: 'Kinley'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Aaron.Kinley@ex.com'},
      {id: 2, name: {first: 'Fred', last: 'Wecler'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Fred.Wecler@ex.com'},
      {id: 3, name: {first: 'Steve', last: 'Wilson'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Steve.Wilson@ex.com'},
      {id: 4, name: {first: 'Maria', last: 'Fernandez'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'M.Fernandez@ex.com'},
      {id: 5, name: {first: 'Pierre', last: 'Barbault'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Pierre.Barbault@ex.com'},
      {id: 6, name: {first: 'Nancy', last: 'Moore'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Nancy.Moore@ex.com'},
      {id: 7, name: {first: 'Barbara', last: 'MacDonald'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'B.MacDonald@ex.com'},
      {id: 8, name: {first: 'Wilma', last: 'Williams'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Wilma.Williams@ex.com'},
      {id: 9, name: {first: 'Sasha', last: 'Silver'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Sasha.Silver@ex.com'},
      {id: 10, name: {first: 'Don', last: 'Pérignon'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Don.Pérignon@ex.com'},
      {id: 11, name: {first: 'Aaron', last: 'Kinley'}, children: [{first: 'Bubba', last: 'Leatherchest'}, {first: 'Tux', last: 'Sysop', toys: ['Linux', 'JS-Perf', 'Machine Guns']}], ip: '0.0.0.1', email: 'Aaron.Kinley@ex.com'}
    ];

Test runner

Ready to run.

Testing in
TestOps/sec
deepClone1 (JSON parse/stringify)
var b, i = 10;
while(i--)
    b = deepClone1(a);

compareObjs(a, b);
 
ready
deepClone2 (full obj deep clone)
var b, i = 10;
while(i--)
    b = deepClone2(a);

compareObjs(a, b);
 
ready
deepClone3 (simple for-in)
// comes from: http://jsperf.com/cloning-an-object/23

// NOTE: this jsperf is intentionally set up to prove that the
// deep cloning shown on that other jsperf is invalid, that's
// why this test throws an error, because the comparison fails.

var b, i = 10;
while(i--)
    b = deepClone3(a);

compareObjs(a, b);
 
ready
deepClone4 (lodash deep clone)
// adapted from: http://jsperf.com/cloning-an-object/23

var b, i = 10;
while(i--)
    b = deepClone4(a);

compareObjs(a, b);
 
ready
deepClone5 (jQuery deep extend)
// adapted from: http://jsperf.com/cloning-an-object/23

var b, i = 10;
while(i--)
    b = deepClone5(a);

compareObjs(a, b);
 
ready
deepClone6 (Object.clone)
// comes from: http://jsperf.com/cloning-an-object/23

// NOTE: this jsperf is intentionally set up to prove that the
// deep cloning shown on that other jsperf is invalid, that's
// why this test throws an error, because the comparison fails.

var b, i = 10;
while(i--)
    b = deepClone6(a);

compareObjs(a, b);

 
ready
deepClone7 (structured clone)
// adapted/reduced from: http://jsperf.com/structured-clone-objects/2 
// and https://developer.mozilla.org/en-US/docs/DOM/The_structured_clone_algorithm

var b, i = 10;
while(i--)
    b = deepClone7(a);

compareObjs(a, b);
 
ready
cpo (Oscar Campbell's copy-object, with reference recursion aware = true)
// Compared to deepClone1, and others, this handles Function, 
// Date and RegExp properties/objects fine too. /ORC
// In this mode it also makes sure to not follow recursive references,
// instead returning the copy made, thereby even cloning the 
// inner-object recursion. /ORC

var b, i = 10;
while(i--)
    b = cpo(a, true);

compareObjs(a, b);
 
ready
cpo (Oscar Campbell's copy-object, with automatic fallback to reference recursion aware on threshold count=10000)
// Compared to deepClone1, and others, this handles Function, 
// Date and RegExp properties/objects fine too. /ORC
// In this mode it keeps track of object divings - if it gets
// above chosen threshold - it aborts and falls back to using
// the 'Recursive References Objects'-safe version and then 
// makes sure to not follow recursive references,
// instead returning the copy made, thereby even cloning the 
// inner-object recursion. /ORC

var b, i = 10;
while(i--)
    b = cpo(a, 10000);

compareObjs(a, b);
 
ready
cpo (Oscar Campbell's copy-object, with automatic fallback to reference recursion aware on threshold count=699 [aka, deliberate worst case])
// Compared to deepClone1, and others, this handles Function, 
// Date and RegExp properties/objects fine too. /ORC
// In this mode it keeps track of object divings - if it gets
// above chosen threshold - it aborts and falls back to using
// the 'Recursive References Objects'-safe version and then 
// makes sure to not follow recursive references,
// instead returning the copy made, thereby even cloning the 
// inner-object recursion. /ORC

var b, i = 10;
while(i--)
    b = cpo(a, 699);

compareObjs(a, b);
 
ready
cpo (Oscar Campbell's copy-object, no-belts version - [faster])
// Compared to deepClone1, and others, this handles Function, 
// Date and RegExp properties/objects fine too. /ORC
// In this mode, no thought is given to reference recursion.
var b, i = 10;
while(i--)
    b = cpo(a);

compareObjs(a, b);
 
ready

Revisions

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

  • Revision 1: published by Kyle Simpson on
  • Revision 2: published by Bernie on
  • Revision 3: published by derry on
  • Revision 4: published by Marcin on
  • Revision 5: published by Marcin on
  • Revision 9: published by Oscar Campbell on
  • Revision 10: published by Oscar Campbell on
  • Revision 11: published on
  • Revision 12: published by Oscar Campbell on
  • Revision 28: published by cari bisnis rumahan sampingan on
  • Revision 29: published by cari modal usaha on
  • Revision 31: published on