function deepClone(value) {
    var accessor,
        circular,
        clone,
        ctor,
        data,
        descriptor,
        extensible,
        key,
        length,
        markerKey,
        parent,
        result,
        source,
        subIndex,
        index = -1,
        marked = [],
        unmarked = [],
        queue = { '0': { 'value': value }, 'length': 1 };

    /**
     * An easily detectable decorator for cloned values.
     */
    function Marker(object) {
      this.raw = object;
    }

    /**
     * Gets an available marker key for the given object.
     */
    function getMarkerKey(object) {
      // avoid collisions with existing keys
      var result = uid;
      while (object[result] && object[result].constructor != Marker) {
        result += 1;
      }
      return result;
    }

    /**
     * The callback used by `forProps()`.
     */
    function propCallback(subValue, subKey) {
      // exit early to avoid cloning the marker
      if (subValue && subValue.constructor == Marker) {
        return;
      }
      // add objects to the queue
      if (subValue === Object(subValue)) {
        queue[queue.length++] = { 'key': subKey, 'parent': clone, 'source': value };
      }
      // assign non-objects
      else {
        clone[subKey] = subValue;
      }
    }

    while ((data = queue[++index])) {
      key = data.key;
      parent = data.parent;
      source = data.source;
      clone = value = source ? source[key] : data.value;
      accessor = circular = descriptor = false;
      delete queue[index - 1];

      // create a basic clone to filter out functions, DOM elements, and
      // other non `Object` objects
      if (value === Object(value)) {
        ctor = value.constructor;
        switch (toString.call(value)) {
          case '[object Array]':
            clone = new ctor(value.length);
            break;

          case '[object Boolean]':
            clone = new ctor(value == true);
            break;

          case '[object Date]':
            clone = new ctor(+value);
            break;

          case '[object Object]':
            isObject(value) && (clone = new ctor);
            break;

          case '[object Number]':
          case '[object String]':
            clone = new ctor(value);
            break;

          case '[object RegExp]':
            clone = ctor(value.source,
              (value.global     ? 'g' : '') +
              (value.ignoreCase ? 'i' : '') +
              (value.multiline  ? 'm' : ''));
        }
        // continue clone if `value` doesn't have an accessor descriptor
        // http://es5.github.com/#x8.10.1
        if (clone != value &&
            !(descriptor = source && has.descriptors && getDescriptor(source, key),
              accessor = descriptor && (descriptor.get || descriptor.set))) {
          // use an existing clone (circular reference)
          if ((extensible = isExtensible(value))) {
            markerKey = getMarkerKey(value);
            if (value[markerKey]) {
              circular = clone = value[markerKey].raw;
            }
          } else {
            // for frozen/sealed objects
            for (subIndex = 0, length = unmarked.length; subIndex < length; subIndex++) {
              data = unmarked[subIndex];
              if (data.object === value) {
                circular = clone = data.clone;
                break;
              }
            }
          }
          if (!circular) {
            // mark object to allow quickly detecting circular references and tie it to its clone
            if (extensible) {
              value[markerKey] = new Marker(clone);
              marked.push({ 'key': markerKey, 'object': value });
            } else {
              // for frozen/sealed objects
              unmarked.push({ 'clone': clone, 'object': value });
            }
            // iterate over object properties
            forProps(value, propCallback, { 'which': 'all' });
          }
        }
      }
      if (parent) {
        // for custom property descriptors
        if (accessor || (descriptor &&
            !(descriptor.configurable && descriptor.enumerable && descriptor.writable))) {
          descriptor.value && (descriptor.value = clone);
          setDescriptor(parent, key, descriptor);
        }
        // for default property descriptors
        else {
          parent[key] = clone;
        }
      } else {
        result = clone;
      }
    }
    // remove markers
    for (index = 0, length = marked.length; index < length; index++) {
      data = marked[index];
      delete data.object[data.key];
    }
    return result;
  }
A deep clone utility.
@static
@memberOf Benchmark
@param {Mixed} value The value to clone.
@returns {Mixed} The cloned value.