Mega trim test

JavaScript performance comparison

Revision 26 of this test case created by termi

Info

Trim function

Preparation code

<script>
/* mytrim3 is a tuned version of mytrim2 */
if(!String.prototype.trim || "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF".trim() || navigator.userAgent.toString().toLowerCase().indexOf("chrome") != -1) var mytrim3 = function(str) {
      var c, i = 0, j = str.length - 1;
      for(; i <= j; i++) {
        c = str.charCodeAt(i);
        if(c < 8192) {
          if(c < 256 && (c == 32 || (c >= 9 && c <= 13) || c == 160)) {
            continue;
          } else if(c == 5760 || c == 6158) {
            continue;
          }
          break;
        } else if(c <= 8202 || c == 8232 || c == 8233 || c == 8239 || c == 8287 || c == 12288) {
          continue;
        }
        break;
      }
      for(; j >= i; j--) {
        c = str.charCodeAt(j);
        if(c < 8192) {
          if(c < 256 && (c == 32 || (c >= 9 && c <= 13) || c == 160)) {
            continue;
          } else if(c == 5760 || c == 6158) {
            continue;
          }
          break;
        } else if(c <= 8202 || c == 8232 || c == 8233 || c == 8239 || c == 8287 || c == 12288) {
          continue;
        }
        break;
      }
      return str.substring(i, j + 1);
    };
  else var mytrim3 = function(str) {
      return str.trim();
      }





        /*
mytrim2 is a tuned version of mytrim and is based on trim28 from here:
http://jsperf.com/mega-trim-test/20
*/

  if (!String.prototype.trim || "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF".trim() || navigator.userAgent.toString().toLowerCase().indexOf("chrome") != -1) var mytrim2 = function(str) {
      var c;
      for (var i = 0; i < str.length; i++) {
        c = str.charCodeAt(i);
        if (c < 8192) {
          if (c < 256 && (c == 32 || (c >= 9 && c <= 13) || c == 160)) continue;
          else if (c == 5760 || c == 6158) continue;
          break;
        } else if (c <= 8202 || c == 8232 || c == 8233 || c == 8239 || c == 8287 || c == 12288) continue;
        break;
      }
      for (var j = str.length - 1; j >= i; j--) {
        c = str.charCodeAt(j);
        if (c < 8192) {
          if (c < 256 && (c == 32 || (c >= 9 && c <= 13) || c == 160)) continue;
          else if (c == 5760 || c == 6158) continue;
          break;
        } else if (c <= 8202 || c == 8232 || c == 8233 || c == 8239 || c == 8287 || c == 12288) continue;
        break;
      }
      return str.substring(i, j + 1);
      };
  else var mytrim2 = function(str) {
      return str.trim();
      }
     
     
     
     
     
     
      /*
mytrim() uses native function if it is available and can trim all required whitespace chars, otherwise it uses custom function.
because of slow native trim of chrome and chromium, custom function is used in them.
*/

  if (!String.prototype.trim || "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF".trim() || navigator.userAgent.toString().toLowerCase().indexOf("chrome") != -1) var mytrim = function(str) {
      var c;
      for (var i = 0; i < str.length; i++) {
        c = str.charCodeAt(i);
        if (c == 32 || c == 10 || c == 13 || c == 9 || c == 12 || c == 11 || c == 160 || c == 5760 || c == 6158 || c == 8192 || c == 8193 || c == 8194 || c == 8195 || c == 8196 || c == 8197 || c == 8198 || c == 8199 || c == 8200 || c == 8201 || c == 8202 || c == 8232 || c == 8233 || c == 8239 || c == 8287 || c == 12288 || c == 65279) continue;
        else break;
      }
      for (var j = str.length - 1; j >= i; j--) {
        c = str.charCodeAt(j);
        if (c == 32 || c == 10 || c == 13 || c == 9 || c == 12 || c == 11 || c == 160 || c == 5760 || c == 6158 || c == 8192 || c == 8193 || c == 8194 || c == 8195 || c == 8196 || c == 8197 || c == 8198 || c == 8199 || c == 8200 || c == 8201 || c == 8202 || c == 8232 || c == 8233 || c == 8239 || c == 8287 || c == 12288 || c == 65279) continue;
        else break;
      }
      return str.substring(i, j + 1);
      };
  else var mytrim = function(str) {
      return str.trim();
      }
     
     
     
     
     
     
     
  var mytrim_plain = function(str) {
      var c;
      for (var i = 0; i < str.length; i++) {
        c = str.charCodeAt(i);
        if (c == 32 || c == 10 || c == 13 || c == 9 || c == 12 || c == 11 || c == 160 || c == 5760 || c == 6158 || c == 8192 || c == 8193 || c == 8194 || c == 8195 || c == 8196 || c == 8197 || c == 8198 || c == 8199 || c == 8200 || c == 8201 || c == 8202 || c == 8232 || c == 8233 || c == 8239 || c == 8287 || c == 12288 || c == 65279) continue;
        else break;
      }
      for (var j = str.length - 1; j >= i; j--) {
        c = str.charCodeAt(j);
        if (c == 32 || c == 10 || c == 13 || c == 9 || c == 12 || c == 11 || c == 160 || c == 5760 || c == 6158 || c == 8192 || c == 8193 || c == 8194 || c == 8195 || c == 8196 || c == 8197 || c == 8198 || c == 8199 || c == 8200 || c == 8201 || c == 8202 || c == 8232 || c == 8233 || c == 8239 || c == 8287 || c == 12288 || c == 65279) continue;
        else break;
      }
      return str.substring(i, j + 1);
      };

  function trim0(str) {
    return str.replace(/^(\s*)/, '').replace(/\s*$/, '');
  }

  function trim1(str) {
    return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
  }

  function trim2(str) {
    return str.replace(/^\s+/, '').replace(/\s+$/, '');
  }

  function trim3(str) {
    return str.substring(Math.max(str.search(/\S/), 0), str.search(/\S\s*$/) + 1);
  }

  function trim4(str) {
    return str.replace(/^\s+|\s+$/g, '');
  }

  function trim5(s) {
    var str = s.match(/\S+(?:\s+\S+)*/);
    return str ? str[0] : '';
  }

  function trim6(str) {
    return str.replace(/^\s*(\S*(\s+\S+)*)\s*$/, '$1');
  }

  function trim7(str) {
    return str.replace(/^\s*(\S*(?:\s+\S+)*)\s*$/, '$1');
  }

  function trim8(str) {
    return str.replace(/^\s*((?:[\S\s]*\S)?)\s*$/, '$1');
  }

  function trim9(str) {
    return str.replace(/^\s*([\S\s]*?)\s*$/, '$1');
  }

  var trim10_whitespace = ' \n\r\t\f\x0b\xa0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000';

  function trim10(s) {
    var str = s;
    for (var i = 0; i < str.length; i++) {
      if (trim10_whitespace.indexOf(str.charAt(i)) === -1) {
        str = str.substring(i);
        break;
      }
    }
    for (i = str.length - 1; i >= 0; i--) {
      if (trim10_whitespace.indexOf(str.charAt(i)) === -1) {
        str = str.substring(0, i + 1);
        break;
      }
    }
    return trim10_whitespace.indexOf(str.charAt(0)) === -1 ? str : '';
  }

  function trim11(s) {
    var str = s.replace(/^\s+/, '');
    for (var i = str.length - 1; i >= 0; i--) {
      if (/\S/.test(str.charAt(i))) {
        str = str.substring(0, i + 1);
        break;
      }
    }
    return str;
  }

  function trim12(s) {
    var str = s.replace(/^\s\s*/, ""),
        ws = /\s/,
        i = str.length;
    while (ws.test(str.charAt(--i)));
    return str.slice(0, i + 1);
  }
  // trim12 with \s+ insteas od \s\s*

  function trim13(s) {
    var str = s.replace(/^\s+/, ""),
        ws = /\s/,
        i = str.length;
    while (ws.test(str.charAt(--i)));
    return str.slice(0, i + 1);
  }
  // trim12 without single ws=/\s/

  function trim14(s) {
    var str = s.replace(/^\s\s*/, ""),
        i = str.length;
    while (/\s/.test(str.charAt(--i)));
    return str.slice(0, i + 1);
  }

  // same as trim11, but > not >=
  // buggy for "a " in Chromium

  function trim15(str) {
    str = str.replace(/^\s+/, '');
    for (var i = str.length - 1; i > 0; i--) {
      if (/\S/.test(str.charAt(i))) {
        str = str.substring(0, i + 1);
        break;
      }
    }
    return str;
  }
  trim15.buggy = true;

  // trim12 on http://zanstra.com/base/blog/trim_mac_roundup
  var trim16_whitespace = ' \n\r\t\v\f\u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000';

  function trim16(s) {
    var i = 0,
        j = s.length - 1;
    while (i < s.length && trim16_whitespace.indexOf(s.charAt(i)) != -1)
    i++;
    while (j > i && trim16_whitespace.indexOf(s.charAt(j)) != -1)
    j--;
    return s.substring(i, j + 1);
  }

  // trim12 in http://blog.stevenlevithan.com/archives/faster-trim-javascript#comment-13585
  // looks to be buggy in Opera and Chromium. Works ok in Epiphany.
  // buggy for " ala ma " in Chromium
  // buggy for "ala ma " in Chromium

  function trim17(str) {
    var str1 = str.replace(/^\s\s*/, '');
    var len = str1.length;
    if (len && /\s/.test(str1.charAt(len - 1))) {
      var re = /.*\S/g;
      re.test(str1);
      str1 = str1.slice(0, re.lastIndex);
    }
    return str1;
  }
  trim17.buggy = true;

  // trim in http://blog.stevenlevithan.com/archives/faster-trim-javascript#comment-39371
  // slightly changed return
  //var trim18_whitespace = trim21_whitespace;

  function trim18(str) {
    var len = str.length;
    if (len) {
      while (trim21_whitespace[str.charCodeAt(--len)]);
      if (++len) {
        var i = 0;
        while (trim21_whitespace[str.charCodeAt(i)]) {
          ++i;
        }
      }
      return str.substring(i, len);
    }
    return str;
  }

  // http://blog.stevenlevithan.com/archives/faster-trim-javascript#comment-21439

  function trim19(str) {
    var ws = /\s/,
        _start = 0,
        end = str.length;
    while (ws.test(str.charAt(_start++)));
    while (ws.test(str.charAt(--end)));
    return str.slice(_start - 1, end + 1);
  }

  // http://blog.stevenlevithan.com/archives/faster-trim-javascript#comment-28776

  function trim20(str) {
    var whitespace = " \n\r\t\f";
    for (var i = 0; i < str.length; i++)
    if (whitespace.indexOf(str.charAt(i)) < 0) break;

    for (var j = str.length - 1; j >= i; j--)
    if (whitespace.indexOf(str.charAt(j)) < 0) break;

    return str.substring(i, j + 1);
  }

  // in original it was manually populated, but looping is nicer
  var trim21_whitespace = {};
  var trim21_ww = [
  0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x0020, 0x0085, 0x00a0, 0x1680, 0x180e, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200a, 0x200b, 0x2028, 0x2029, 0x202f, 0x205f, 0x3000];
  for (var i = 0; i < trim21_ww.length; i++) {
    trim21_whitespace[trim21_ww[i]] = true;
  }
  // http://blog.stevenlevithan.com/archives/faster-trim-javascript#comment-25052
  // looks to be buggy as it returns different results than others in Epiphany, Chromium (correct in Opera)
  // bug for "  a"
  // buggy for  ' 40. To no one will we sell.'  in Chromium

  function trim21(str) {
    var n = str.length;
    var s = trim21_whitespace;
    var i;
    if (!n) return str;
    if (n && s[str.charCodeAt(n - 1)]) {
      do {--n;
      } while (n && s[str.charCodeAt(n - 1)]);
      if (n && s[str.charCodeAt(0)]) {
        i = 1;
        while (i < n && s[str.charCodeAt(i)])++i;
      }
      return str.substring(i, n);
    }
    if (n && s[str.charCodeAt(0)]) {
      i = 1;
      while (i < n && s[str.charAt(i)])++i;
      return str.substring(i, n);
    }
    return str;
  };
  trim21.buggy = true;

  // rialto framework, http://blog.stevenlevithan.com/archives/faster-trim-javascript#comment-25038
  // VERY looks to be buggy as it returns different results than others in Epiphany, Chromium, Opera (in Opera even differently)
  // bug for " ", ' 40. To no one. ', '40. To no one. '

  function trim22(str) {
    return str.replace(/^\s*(\b.*\b|)\s*$/, '$1');
  }
  trim22.buggy = true;

  // http://blog.stevenlevithan.com/archives/faster-trim-javascript#comment-13585
  // slightly moded return
  // looks to be buggy in Chromium (correct in Opera and Epiphany)
  // buggy for " ala ma " in Chromium
  // buggy for "ala ma " in Chromium

  function trim23(s) {
    var str = s.replace(/^\s\s*/, ''),
        len = str.length;
    if (len && /\s/.test(str.charAt(len - 1))) {
      var re = /.*\S/g;
      re.test(str);
      return str.slice(0, re.lastIndex);
    } else {
      return str;
    }
  }
  trim23.buggy = true;

  // http://blog.stevenlevithan.com/archives/faster-trim-javascript#comment-6808
  this.trim24 = (function() {
    var ws = {},
        chars = ' \n\r\t\v\f\u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000';
    for (var i = 0; i < chars.length; i++)
    ws[chars.charAt(i)] = true;

    return function(str) {
      var s = -1,
          e = str.length;
      while (ws[str.charAt(--e)]);
      while (s++ !== e && ws[str.charAt(s)]);
      return str.substring(s, e + 1);
    };
  })();

  // http://blog.stevenlevithan.com/archives/faster-trim-javascript#comment-6169

  function trim25(s) {
    var str = s.replace(/^\s+/, '');
    for (var i = str.length; i--;)
    if (/\S/.test(str.charAt(i))) return str.substring(0, ++i)
    return str
  }

  // bug for "  s"

  function trim26(str) {
    return str.replace(/^\s*(\S.*\S)?\s*$/, '$1');
  }
  trim26.buggy = true;


  function trim_native(str) {
    return str.trim(); // should throw is no such function
  }

  var inp = "<!doctype html><html itemscope=\"itemscope\" itemtype=\"http://schema.org/WebPage\"><head><meta itemprop=\"image\" content=\"/images/google_favicon_128.png\"><title>google - Google Search</title><ololo>(function(){\nwindow.google={kEI:\"d3JAUbqwHobItAbs9oH4Bw\",getEI:function(a){for(var b;a&&(!a.getAttribute||!(b=a.getAttribute(\"eid\")));)a=a.parentNode;return b||google.kEI},https:function(){return\"https:\"==window.location.protocol},kEXPI:\"31215,39523,4000116,4001569,4001948,4001959,4001975,4002207,4002562,4002734,4003052,4003240,4003242,4003387,4003575,4003638,4003881,4003917,4004066,4004181,4004213,4004235,4004257,4004296,4004298,4004308,4004334,4004356,4004370,4004388,4004479,4004488,4004490,4004653,4004755,4004759,4004778,4004779,4004905,4004948,4004952\",kCSI:{e:\"31215,39523,4000116,4001569,4001948,4001959,4001975,4002207,4002562,4002734,4003052,4003240,4003242,4003387,4003575,4003638,4003881,4003917,4004066,4004181,4004213,4004235,4004257,4004296,4004298,4004308,4004334,4004356,4004370,4004388,4004479,4004488,4004490,4004653,4004755,4004759,4004778,4004779,4004905,4004948,4004952\",ei:\"d3JAUbqwHobItAbs9oH4Bw\"},authuser:0,ml:function(){},pageState:\"#\",kHL:\"en\",time:function(){return(new Date).getTime()},log:function(a,\nb,c,k){var d=new Image,f=google.lc,e=google.li,g=\"\";d.onerror=d.onload=d.onabort=function(){delete f[e]};f[e]=d;!c&&-1==b.search(\"&ei=\")&&(g=\"&ei=\"+google.getEI(k));c=c||\"/gen_204?atyp=i&ct=\"+a+\"&cad=\"+b+g+\"&zx=\"+google.time();a=/^http:/i;a.test(c)&&google.https()?(google.ml(Error(\"GLMM\"),!1,{src:c}),delete f[e]):(d.src=c,google.li=e+1)},lc:[],li:0,j:{en:1,l:function(){google.fl=!0},e:function(){google.fl=!0},b:!!location.hash&&!!location.hash.match(\"[#&]((q|fp)=|tbs=simg|tbs=sbi)\"),bv:21,cf:\"\",\npm:\"p\",pl:[],mc:0,sc:0.5,u:\"5dcc221e\"},Toolbelt:{},y:{},x:function(a,b){google.y[a.id]=[a,b];return!1},load:function(a,b){google.x({id:\"l\"+a},function(){google.load(a,b)})}};\n\nwindow.onpopstate=function(){google.j.psc=1};for(var h=\"ad api bc is p pa ac pc pah ph sa sifp slp spf spn xx zc zz\".split(\" \"),l=0,m;m=h[l++];)(function(a){google.j[a]=function(){google.j.pl.push([a,arguments])}})(m);\nwindow.chrome||(window.chrome={});window.chrome.sv=2.00;window.chrome.searchBox||(window.chrome.searchBox={});window.chrome.searchBox.onsubmit=function(){google.x({id:\"psyapi\"},function(){var a=encodeURIComponent(window.chrome.searchBox.value);google.nav.search({q:a,sourceid:\"chrome-psyapi2\"})})};})();\ngoogle.arwt=function(a){a.href=document.getElementById(a.id.substring(1)).href;return!0};google.arwt2=function(a){a.href=document.getElementById(\"h\"+a.id).href;return!0};</ololo><ololo>(function(){'use strict';var b=null,h=this;var p=function(c,m){return function(f){f||(f=window.event);return m.call(c,f)}},s=\"undefined\"!=typeof navigator&&/Macintosh/.test(navigator.userAgent),u=\"undefined\"!=typeof navigator&&!/Opera/.test(navigator.userAgent)&&/WebKit/.test(navigator.userAgent),v=\"undefined\"!=typeof navigator&&!/Opera|WebKit/.test(navigator.userAgent)&&/Gecko/.test(navigator.product)?\"keypress\":\"keydown\";var w=function(c){this.k=!c;this.h=[];this.a=[];this.g={};this.d=b;this.c=[]},z=\"undefined\"!=typeof navigator&&/iPhone|iPad|iPod/.test(navigator.userAgent),A=/\s*;\s*/,B=function(c,m,f){return function(a){var d;a:{d=m;if(\"click\"==d&&(s&&a.metaKey||!s&&a.ctrlKey))d=\"clickmod\";else{var n=a.which||a.keyCode||a.key,g;if(g=a.type==v){g=a.srcElement||a.target;var e=g.tagName.toUpperCase(),l;if(!(l=\"TEXTAREA\"==e)){if(e=\"INPUT\"==e)e=(e=g.type)?e.toUpperCase():void 0,e=!(void 0!==e&&(\"BUTTON\"==e||\"CHECKBOX\"==e||\"IMAGE\"==e||\"RADIO\"==e||\"RANGE\"==e||\"RESET\"==e||\"SUBMIT\"==e));l=e||g.isContentEditable}g=\n!l&&!(a.ctrlKey||a.shiftKey||a.altKey||a.metaKey)&&(13==n||32==n||u&&3==n)}g&&(d=\"clickkey\")}for(g=n=a.srcElement||a.target;g&&g!=this;g=g.parentNode){e=g;var k=e;l=d;var q=k.__jsaction;if(!q){q={};f&&(k.__jsaction=q);var t=b;\"getAttribute\"in k&&(t=k.getAttribute(\"jsaction\"));if(k=t)for(var k=k.split(A),t=0,P=k?k.length:0;t<P;t++){var r=k[t];if(r){var y=r.indexOf(\":\"),I=-1!=y,Q=I?r.substr(0,y).replace(/^\s+/,\"\").replace(/\s+$/,\"\"):\"click\",r=I?r.substr(y+1).replace(/^\s+/,\"\").replace(/\s+$/,\"\"):r;q[Q]=r}}}k=void 0;\"clickkey\"==l?l=\"click\":\"click\"==l&&(k=q.click||q.clickonly);l=(k=k||q[l])?{i:l,action:k}:void 0;if(l){d={eventType:l.i,event:a,targetElement:n,action:l.action,actionElement:e};break a}}d=b}if(d)if(a.stopPropagation?a.stopPropagation():a.cancelBubble=!0,\"A\"==d.actionElement.tagName&&\"click\"==m&&(a.preventDefault?a.preventDefault():a.returnValue=!1),c.d)c.d(d);else{var n=d,x;if((g=h.document)&&!g.createEvent&&g.createEventObject)try{x=g.createEventObject(a)}catch(U){x=a}else x=a;n.event=x;c.c.push(d)}}},C=function(c,m){return function(f){var a=c,d=m,n=!1;if(f.addEventListener){if(\"focus\"==a||\"blur\"==a)n=!0;f.addEventListener(a,d,n)}else f.attachEvent&&(\"focus\"==a?a=\"focusin\":\"blur\"==a&&(a=\"focusout\"),d=p(f,d),f.attachEvent(\"on\"+a,d));return{i:a,m:d,capture:n}}},D=function(c,m){if(!c.g.hasOwnProperty(m)){var f=B(c,m,c.k),a=C(m,f);c.g[m]=f;c.h.push(a);for(f=0;f<c.a.length;++f){var d=c.a[f];d.c.push(a.call(b,d.a))}\"click\"==m&&D(c,v)}};w.prototype.m=function(c){return this.g[c]};var F=function(){this.a=E;this.c=[]};var G=new w,E=window.document.documentElement,H;a:{for(var J=0;J<G.a.length;J++){for(var K=G.a[J].a,L=E;K!=L&&L.parentNode;)L=L.parentNode;if(K==L){H=!0;break a}}H=!1}if(!H){z&&(E.style.cursor=\"pointer\");for(var M=new F,N=0;N<G.h.length;++N)M.c.push(G.h[N].call(b,M.a));G.a.push(M)}D(G,\"click\");D(G,\"focus\");D(G,\"focusin\");D(G,\"blur\");D(G,\"focusout\");D(G,\"change\");D(G,\"keydown\");D(G,\"keypress\");D(G,\"mousedown\");D(G,\"mouseout\");D(G,\"mouseover\");D(G,\"mouseup\");D(G,\"touchstart\");D(G,\"touchmove\");D(G,\"touchend\");var O=function(c){G.d=c;G.c&&(0<G.c.length&&c(G.c),G.c=b)},R=[\"google\",\"jsad\"],S=h;!(R[0]in S)&&S.execololo&&S.execololo(\"var \"+R[0]);for(var T;R.length&&(T=R.shift());)!R.length&&void 0!==O?S[T]=O:S=S[T]?S[T]:S[T]={};}).call(window);</ololo><ololo>(function(){var d=!1;google.sn=\"web\";google.timers={};google.startTick=function(a,b){google.timers[a]={t:{start:google.time()},bfr:!!b}};google.tick=function(a,b,h){google.timers[a]||google.startTick(a);google.timers[a].t[b]=h||google.time()};google.startTick(\"load\",!0);\ntry{}catch(e){}})();\n</ololo><style id=\"ostyle\">#gb{font:13px/27px Arial,sans-serif;height:102px}#gbz,#gbg{position:absolute;white-space:nowrap;top:0;height:30px;z-index:1000}#gbz{left:0;padding-left:4px}#gbg{right:0;padding-right:5px}#gbs{background:transparent;position:absolute;top:-999px;visibility:hidden;z-index:998}.gbto #gbs{background:#fff}#gbx3,#gbx4{background-color:#2d2d2d;background-image:none;_background-image:none;background-position:0 -138px;background-repeat:repeat-x;border-bottom:1px solid #000;font-size:24px;height:29px;_height:30px;opacity:1;filter:alpha(opacity=100);position:absolute;top:0;width:100%;z-index:990}#gbx3{left:0}#gbx4{right:0}#gbb{position:relative}#gbbw{left:0;position:absolute;top:102px;width:100%}.gbtcb{position:absolute;visibility:hidden}#gbz .gbtcb{right:0}#gbg .gbtcb{left:0}.gbxx{display:none !important}.gbxo{opacity:0 !important;filter:alpha(opacity=0) !important}.gbm{position:absolute;z-index:999;top:-999px;visibility:hidden;text-align:left;border:1px solid #bebebe;background:#fff;-moz-box-shadow:-1px 1px 1px rgba(0,0,0,.2);-webkit-box-shadow:0 2px 4px rgba(0,0,0,.2);box-shadow:0 2px 4px rgba(0,0,0,.2)}.gbrtl .gbm{-moz-box-shadow:1px 1px 1px rgba(0,0,0,.2)}.gbto .gbm,.gbto #gbs{top:51px;visibility:visible}#gbz .gbm,#gbz #gbs{left:0}#gbg .gbm,#gbg #gbs{right:0}.gbxms{background-color:#ccc;display:block;position:absolute;z-index:1;top:-1px;left:-2px;right:-2px;bottom:-2px;opacity:.4;-moz-border-radius:3px;filter:progid:DXImageTransform.Microsoft.Blur(pixelradius=5);*opacity:1;*top:-2px;*left:-5px;*right:5px;*bottom:4px;-ms-filter:\"progid:DXImageTransform.Microsoft.Blur(pixelradius=5)\";opacity:1\0/;top:-4px\0/;left:-6px\0/;right:5px\0/;bottom:4px\0/}.gbma{position:relative;top:-1px;border-style:solid dashed dashed;border-color:transparent;border-top-color:#c0c0c0;display:-moz-inline-box;display:inline-block;font-size:0;height:0;line-height:0;width:0;border-width:3px 3px 0;padding-top:1px;left:4px}#gbztms1,#gbi4m1,#gbi4s,#gbi4t{zoom:1}.gbtc,.gbmc,.gbmcc{display:block;list-style:none;margin:0;padding:0}.gbmc{background:#fff;padding:10px 0;position:relative;z-index:2;zoom:1}.gbt{position:relative;display:-moz-inline-box;display:inline-block;line-height:27px;padding:0;vertical-align:top}.gbt{*display:inline}.gbto{box-shadow:0 2px 4px rgba(0,0,0,.2);-moz-box-shadow:0 2px 4px rgba(0,0,0,.2);-webkit-box-shadow:0 2px 4px rgba(0,0,0,.2)}.gbzt,.gbgt{cursor:pointer;display:block;text-decoration:none !important}span#gbg6,span#gbg4{cursor:default}.gbts{border-left:1px solid transparent;border-right:1px solid transparent;display:block;*display:inline-block;padding:0 5px;position:relative;z-index:1000}.gbts{*display:inline}.gbzt .gbts{display:inline;zoom:1}.gbto .gbts{background:#fff;border-color:#bebebe;color:#36c;padding-bottom:1px;padding-top:2px}.gbz0l .gbts{color:#fff;font-weight:bold}.gbtsa{padding-right:9px}#gbz .gbzt,#gbz .gbgt,#gbg .gbgt{color:#ccc!important}.gbtb2{display:block;border-top:2px solid transparent}.gbto .gbzt .gbtb2,.gbto .gbgt .gbtb2{border-top-width:0}.gbtb .gbts{background:url(//ssl.gstatic.com/gb/images/h_bedf916a.png);_background:url(//ssl.gstatic.com/gb/images/h8_3dd87cd8.png);background-position:-27px -22px;border:0;font-size:0;padding:29px 0 0;*padding:27px 0 0;width:1px}.gbzt-hvr,.gbzt:focus,.gbgt-hvr,.gbgt:focus{background-color:transparent;background-image:none;_background-image:none;background-position:0 -102px;background-repeat:repeat-x;outline:none;text-decoration:none !important}.gbpdjs .gbto .gbm{min-width:99%}.gbz0l .gbtb2{border-top-color:transparent!important}#gbi4s,#gbi4s1{font-weight:bold}#gbg6.gbgt-hvr,#gbg6.gbgt:focus{background-color:transparent;background-image:none}.gbg4a{font-size:0;line-height:0}.gbg4a .gbts{padding:27px 5px 0;*padding:25px 5px 0}.gbto .gbg4a .gbts{padding:29px 5px 1px;*padding:27px 5px 1px}#gbi4i,#gbi4id{left:5px;border:0;height:24px;position:absolute;top:1px;width:24px}.gbto #gbi4i,.gbto #gbi4id{top:3px}.gbi4p{display:block;width:24px}#gbi4id{background-position:-44px -101px}#gbmpid{background-position:0 0}#gbmpi,#gbmpid{border:none;display:inline-block;height:48px;width:48px}#gbmpiw{display:inline-block;line-height:9px;padding-left:20px;margin-top:10px;position:relative}#gbmpi,#gbmpid,#gbmpiw{*display:inline}#gbg5{font-size:0}#gbgs5{padding:5px !important}.gbto #gbgs5{padding:7px 5px 6px !important}#gbi5{background:url(//ssl.gstatic.com/gb/images/h_bedf916a.png);_background:url(//ssl.gstatic.com/gb/images/h8_3dd87cd8.png);background-position:0 0;display:block;font-size:0;height:17px;width:16px}.gbto #gbi5{background-position:-6px -22px}.gbn .gbmt,.gbn .gbmt:visited,.gbnd .gbmt,.gbnd .gbmt:visited{color:#dd8e27 !important}.gbf .gbmt,.gbf .gbmt:visited{color:#900 !important}.gbmt,.gbml1,.gbmlb,.gbmt:visited,.gbml1:visited,.gbmlb:visited{color:#36c !important;text-decoration:none !important}.gbmt,.gbmt:visited{display:block}.gbml1,.gbmlb,.gbml1:visited,.gbmlb:visited{display:inline-block;margin:0 10px}.gbml1,.gbmlb,.gbml1:visited,.gbmlb:visited{*display:inline}.gbml1,.gbml1:visited{padding:0 10px}.gbml1-hvr,.gbml1:focus{outline:none;text-decoration:underline !important}#gbpm .gbml1{display:inline;margin:0;padding:0;white-space:nowrap}.gbmlb,.gbmlb:visited{line-height:27px}.gbmlb-hvr,.gbmlb:focus{outline:none;text-decoration:underline !important}.gbmlbw{color:#ccc;margin:0 10px}.gbmt{padding:0 20px}.gbmt-hvr,.gbmt:focus{background:#eee;cursor:pointer;outline:0 solid black;text-decoration:none !important}.gbm0l,.gbm0l:visited{color:#000 !important;font-weight:bold}.gbmh{border-top:1px solid #bebebe;font-size:0;margin:10px 0}#gbd4 .gbmc{background:#f5f5f5;padding-top:0}#gbd4 .gbsbic::-webkit-scrollbar-track:vertical{background-color:#f5f5f5;margin-top:2px}#gbmpdv{background:#fff;border-bottom:1px solid #bebebe;-moz-box-shadow:0 2px 4px rgba(0,0,0,.12);-o-box-shadow:0 2px 4px rgba(0,0,0,.12);-webkit-box-shadow:0 2px 4px rgba(0,0,0,.12);box-shadow:0 2px 4px rgba(0,0,0,.12);position:relative;z-index:1}#gbd4 .gbmh{margin:0}.gbmtc{padding:0;margin:0;line-height:27px}.GBMCC:last-child:after,#GBMPAL:last-child:after{content:'\0A\0A';white-space:pre;position:absolute}#gbmps{*zoom:1}#gbd4 .gbpc,#gbmpas .gbmt{line-height:17px}#gbd4 .gbpgs .gbmtc{line-height:27px}#gbd4 .gbmtc{border-bottom:1px solid #bebebe}#gbd4 .gbpc{display:inline-block;margin:16px 0 10px;padding-right:50px;vertical-align:top}#gbd4 .gbpc{*display:inline}.gbpc .gbps,.gbpc .gbps2{display:block;margin:0 20px}#gbmplp.gbps{margin:0 10px}.gbpc .gbps{color:#000;font-weight:bold}.gbpc .gbpd{margin-bottom:5px}.gbpd .gbmt,.gbpd .gbps{color:#666 !important}.gbpd .gbmt{opacity:.4;filter:alpha(opacity=40)}.gbps2{color:#666;display:block}.gbp0{display:none}.gbp0 .gbps2{font-weight:bold}#gbd4 .gbmcc{margin-top:5px}.gbpmc{background:#fef9db}.gbpmc .gbmt{padding:10px 20px}#gbpm{border:0;*border-collapse:collapse;border-spacing:0;margin:0;white-space:normal}#gbpm .gbmt{border-top:none;color:#000 !important;font:11px Arial,sans-serif}#gbpms{*white-space:nowrap}.gbpms2{font-weight:bold;white-space:nowrap}#gbmpal{*border-collapse:collapse;border-spacing:0;border:0;margin:0;white-space:nowrap;width:100%}.gbmpala,.gbmpalb{font:13px Arial,sans-serif;line-height:27px;padding:10px 20px 0;white-space:nowrap}.gbmpala{padding-left:0;text-align:left}.gbmpalb{padding-right:0;text-align:right}#gbmpasb .gbps{color:#000}#gbmpal .gbqfbb{margin:0 20px}.gbp0 .gbps{*display:inline}a.gbiba{margin:8px 20px 10px}.gbmpiaw{display:inline-block;padding-right:10px;margin-bottom:6px;margin-top:10px}.gbxv{visibility:hidden}.gbmpiaa{display:block;margin-top:10px}.gbmpia{border:none;display:block;height:48px;width:48px}.gbmpnw{display:inline-block;height:auto;margin:16px 0 18px;vertical-align:top}.gbqfb,.gbqfba,.gbqfbb{-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;cursor:default !important;display:inline-block;font-weight:bold;height:29px;line-height:29px;min-width:54px;*min-width:70px;padding:0 8px;text-align:center;text-decoration:none !important;-moz-user-select:none;-webkit-user-select:none}.gbqfb:focus,.gbqfba:focus,.gbqfbb:focus{border:1px solid #4d90fe;-moz-box-shadow:inset 0 0 0 1px rgba(255, 255, 255, 0.5);-webkit-box-shadow:inset 0 0 0 1px rgba(255, 255, 255, 0.5);box-shadow:inset 0 0 0 1px rgba(255, 255, 255, 0.5);outline:none}.gbqfb-hvr:focus,.gbqfba-hvr:focus,.gbqfbb-hvr:focus{-webkit-box-shadow:inset 0 0 0 1px #fff,0 1px 1px rgba(0,0,0,.1);-moz-box-shadow:inset 0 0 0 1px #fff,0 1px 1px rgba(0,0,0,.1);box-shadow:inset 0 0 0 1px #fff,0 1px 1px rgba(0,0,0,.1)}.gbqfb-no-focus:focus{border:1px solid #3079ed;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.gbqfb-hvr,.gbqfba-hvr,.gbqfbb-hvr{-webkit-box-shadow:0 1px 1px rgba(0,0,0,.1);-moz-box-shadow:0 1px 1px rgba(0,0,0,.1);box-shadow:0 1px 1px rgba(0,0,0,.1)}.gbqfb::-moz-focus-inner,.gbqfba::-moz-focus-inner,.gbqfbb::-moz-focus-inner{border:0}.gbqfba,.gbqfbb{border:1px solid #dcdcdc;border-color:rgba(0,0,0,.1);color:#444 !important;font-size:11px}.gbqfb{background-color:#4d90fe;background-image:-webkit-gradient(linear,left top,left bottom,from(#4d90fe),to(#4787ed));background-image:-webkit-linear-gradient(top,#4d90fe,#4787ed);background-image:-moz-linear-gradient(top,#4d90fe,#4787ed);background-image:-ms-linear-gradient(top,#4d90fe,#4787ed);background-image:-o-linear-gradient(top,#4d90fe,#4787ed);background-image:linear-gradient(top,#4d90fe,#4787ed);filter:progid:DXImageTransform.Microsoft.gradient(startColorStr='#4d90fe',EndColorStr='#4787ed');border:1px solid #3079ed;color:#fff!important;margin:0 0}.gbqfb-hvr{border-color:#2f5bb7}.gbqfb-hvr:focus{border-color:#2f5bb7}.gbqfb-hvr,.gbqfb-hvr:focus{background-color:#357ae8;background-image:-webkit-gradient(linear,left top,left bottom,from(#4d90fe),to(#357ae8));background-image:-webkit-linear-gradient(top,#4d90fe,#357ae8);background-image:-moz-linear-gradient(top,#4d90fe,#357ae8);background-image:-ms-linear-gradient(top,#4d90fe,#357ae8);background-image:-o-linear-gradient(top,#4d90fe,#357ae8);background-image:linear-gradient(top,#4d90fe,#357ae8)}.gbqfb:active{background-color:inherit;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.3);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.3);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.3)}.gbqfba{background-color:#f5f5f5;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#f1f1f1));background-image:-webkit-linear-gradient(top,#f5f5f5,#f1f1f1);background-image:-moz-linear-gradient(top,#f5f5f5,#f1f1f1);background-image:-ms-linear-gradient(top,#f5f5f5,#f1f1f1);background-image:-o-linear-gradient(top,#f5f5f5,#f1f1f1);background-image:linear-gradient(top,#f5f5f5,#f1f1f1);filter:progid:DXImageTransform.Microsoft.gradient(startColorStr='#f5f5f5',EndColorStr='#f1f1f1')}.gbqfba-hvr,.gbqfba-hvr:active{background-color:#f8f8f8;background-image:-webkit-gradient(linear,left top,left bottom,from(#f8f8f8),to(#f1f1f1));background-image:-webkit-linear-gradient(top,#f8f8f8,#f1f1f1);background-image:-moz-linear-gradient(top,#f8f8f8,#f1f1f1);background-image:-ms-linear-gradient(top,#f8f8f8,#f1f1f1);background-image:-o-linear-gradient(top,#f8f8f8,#f1f1f1);background-image:linear-gradient(top,#f8f8f8,#f1f1f1);filter:progid:DXImageTransform.Microsoft.gradient(startColorStr='#f8f8f8',EndColorStr='#f1f1f1')}.gbqfbb{background-color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#fbfbfb));background-image:-webkit-linear-gradient(top,#fff,#fbfbfb);background-image:-moz-linear-gradient(top,#fff,#fbfbfb);background-image:-ms-linear-gradient(top,#fff,#fbfbfb);background-image:-o-linear-gradient(top,#fff,#fbfbfb);background-image:linear-gradient(top,#fff,#fbfbfb);filter:progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffffff',EndColorStr='#fbfbfb')}.gbqfbb-hvr,.gbqfbb-hvr:active{background-color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:-webkit-linear-gradient(top,#fff,#f8f8f8);background-image:-moz-linear-gradient(top,#fff,#f8f8f8);background-image:-ms-linear-gradient(top,#fff,#f8f8f8);background-image:-o-linear-gradient(top,#fff,#f8f8f8);background-image:linear-gradient(top,#fff,#f8f8f8);filter:progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffffff',EndColorStr='#f8f8f8')}.gbqfba-hvr,.gbqfba-hvr:active,.gbqfbb-hvr,.gbqfbb-hvr:active{border-color:#c6c6c6;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.1);-moz-box-shadow:0 1px 1px rgba(0,0,0,.1);box-shadow:0 1px 1px rgba(0,0,0,.1);color:#222 !important}.gbqfba:active,.gbqfbb:active{-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}#gbql,#gbgsi,#gbgsa,.gbqfi,.gbmai,.gbp0i,.gbmppci,.gbqfh #gbql{background-image:url('//ssl.gstatic.com/gb/images/k1_a31af7ac.png');background-size:294px 45px}@media screen and (min-resolution:1.25dppx),screen and (-o-min-device-pixel-ratio:5/4),screen and (-webkit-min-device-pixel-ratio:1.25),screen and (min-device-pixel-ratio:1.25){#gbql,#gbgsi,#gbgsa,.gbqfi,.gbmai,.gbp0i,.gbmppci,.gbqfh #gbql{background-image:url('//ssl.gstatic.com/gb/images/k2_aca6bcc6.png')}}#gbd1,#gbd1 .gbmc{width:440px;height:190px}#gbd3,#gbd3 .gbmc{width:440px;height:8em}#gb{height:102px;-moz-user-select:-moz-none;-o-user-select:none;-webkit-user-select:none;user-select:none}#gbbw{top:102px;min-width:980px;}#gb.gbet #gbbw,#gb.gbeti #gbbw{min-width:836px;}#gb.gbeu #gbbw,#gb.gbeui #gbbw{min-width:780px;}.gbxx{display:none !important}#gbq,#gbu{position:absolute;top:0px;white-space:nowrap}#gbu{height:71px}#gbu,#gbq1,#gbq3{z-index:987}#gbq{left:0;_overflow:hidden;width:100%;z-index:986}#gbq2{top:0px;z-index:986}#gbu{right:0;height:30px;margin-right:28px;padding-bottom:0;padding-top:20px}#gbx1,#gbx2{background:#f1f1f1;background:-webkit-gradient(radial,100 36,0,100 -40,120,from(#fafafa),to(#f1f1f1)),#f1f1f1;border-bottom:1px solid #666;border-color:#e5e5e5;height:71px;position:absolute;top:0px;width:100%;z-index:985;min-width:980px;}#gb.gbet #gbx1,#gb.gbeti #gbx1{min-width:836px;}#gb.gbeu #gbx1,#gb.gbeui #gbx1{min-width:780px;}#gbx1.gbxngh,#gbx2.gbxngh{background:-webkit-gradient(radial,100 36,0,100 -40,120,from(#ffffff),to(#f1f1f1)),#f1f1f1}#gbx1{left:0}#gbx2{right:0}#gbq1{left:0;margin:0;padding:0;margin-left:16px;position:absolute}.gbes#gbq1{margin-left:0}#gbq3{left:126px;padding-bottom:0;padding-top:20px;position:absolute;top:0px}#gbql{background-repeat:no-repeat;background-position:-63px 0;display:block;height:37px;width:95px}.gbqla{display:inline-block;outline:none;position:relative}.gbqla2{outline:none}.gbqlca{cursor:pointer;cursor:hand;height:100%;position:absolute;top:0;width:100%;left:0}#gbqlt{border:0;border-collapse:collapse;border-spacing:0;margin:0}#gbqlw{display:table-cell;height:71px;padding:0;padding-right:16px;position:relative;vertical-align:middle}#gbqld{border:none;display:block}.gbqldr{max-height:71px;max-width:160px}#gog{height:99px}.gbh{border-top:none}.gbpl,.gbpr,#gbpx1,#gbpx2{border-top:none !important;top:102px !important}.gbpl,.gbpr{margin-top:4px}.gbi5t{color:#666;display:block;margin:1px 15px;text-shadow:none}#gbq2{display:block;margin-left:126px;padding-bottom:0;padding-top:20px}#gbqf{display:block;margin:0;max-width:572px;min-width:572px;white-space:nowrap}.gbexxl#gbq2 #gbqf,.gbexxli#gb #gbqf,.gbexl#gbq2 #gbqf,.gbexli#gb #gbqf{max-width:572px}.gbet#gbq2 #gbqf,.gbeti#gb #gbqf{max-width:434px;min-width:434px}.gbeu#gbqf,.gbeui#gb #gbqf{max-width:319px;min-width:319px}.gbqff{border:none;display:inline-block;margin:0;padding:0;vertical-align:top;width:100%}.gbqff{*display:inline}.gbqfqw,#gbqfb,.gbqfwa{vertical-align:top}#gbqfaa,#gbqfab,#gbqfqwb{position:absolute}#gbqfaa{left:0}#gbqfab{right:0}.gbqfqwb,.gbqfqwc{right:0;left:0}.gbqfqwb{padding:0 8px}#gbqfbw{margin:0 15px;display:inline-block;vertical-align:top}#gbqfbw{*display:inline}.gbqfi{background-position:-33px 0;display:inline-block;height:13px;margin:7px 19px;width:14px}.gbqfi{*display:inline}.gbqfqw{background:#fff;border:1px solid #d9d9d9;border-top:1px solid #c0c0c0;-moz-border-radius:1px;-webkit-border-radius:1px;border-radius:1px;height:27px;}#gbqfqw{position:relative}.gbqfqw-hvr{border:1px solid #b9b9b9;border-top:1px solid #a0a0a0;-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.gbqfwa{display:inline-block;width:100%}.gbqfwa{*display:inline}.gbqfwb{width:40%}.gbqfwc{width:60%}.gbqfwb .gbqfqw{margin-left:10px}.gbqfqw:active,.gbqfqwf{border:1px solid #4d90fe;-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.3);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.3);box-shadow:inset 0 1px 2px rgba(0,0,0,.3);outline:none}#gbqfq,#gbqfqb,#gbqfqc{background:transparent;border:none;height:19px;margin-top:4px;padding:0;vertical-align:top;width:100%}#gbqfq:focus,#gbqfqb:focus,#gbqfqc:focus{outline:none}.gbqfif,.gbqfsf{font:16px arial,sans-serif}#gbqfbwa{display:none;text-align:center;height:0}#gbqfbwa .gbqfba{margin:16px 8px}#gbqfsa,#gbqfsb{font:bold 11px/27px Arial,sans-serif !important;vertical-align:top}#gbu .gbm,#gbu #gbs{right:5px}.gbpdjs #gbu .gbm,.gbpdjs #gbu #gbs{right:0}.gbpdjs #gbu #gbd4{right:5px}#gbu .gbgt,#gbu .gbgt:active{color:#666}#gbu .gbt{margin-left:15px}#gbu .gbto{box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none}#gbg4{padding-right:16px}#gbd1 .gbmc,#gbd3 .gbmc{padding:0}#gbns{display:none}.gbmwc{right:0;position:absolute;top:-999px;width:440px;z-index:999}#gbwc.gbmwca{top:0}.gbmsg{display:none;position:absolute;top:0}.gbmsgo .gbmsg{display:block;background:#fff;width:100%;text-align:center;z-index:3;top:30%}.gbmab,.gbmac,.gbmad,.gbmae{left:5px;border-style:dashed dashed solid;border-color:transparent;border-bottom-color:#bebebe;border-width:0 10px 10px;cursor:default;display:-moz-inline-box;display:inline-block;font-size:0;height:0;line-height:0;position:absolute;top:0;width:0;z-index:1000}.gbmab,.gbmac{visibility:hidden}.gbmac{border-bottom-color:#fff}.gbto .gbmab,.gbto .gbmac{visibility:visible}.gbmai{background-position:-163px -40px;opacity:.8;font-size:0;line-height:0;position:absolute;height:4px;width:7px}.gbgt-hvr .gbmai{opacity:1;filter:alpha(opacity=100)}#gbgs3{background-color:#f8f8f8;background-image:-webkit-gradient(linear,left top,left bottom,from(#f8f8f8),to(#ececec));background-image:-webkit-linear-gradient(top,#f8f8f8,#ececec);background-image:-moz-linear-gradient(top,#f8f8f8,#ececec);background-image:-ms-linear-gradient(top,#f8f8f8,#ececec);background-image:-o-linear-gradient(top,#f8f8f8,#ececec);background-image:linear-gradient(top,#f8f8f8,#ececec);filter:progid:DXImageTransform.Microsoft.gradient(startColorStr='#f8f8f8',EndColorStr='#ececec');border:1px solid #c6c6c6;-moz-border-radius:2px;-o-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;padding:0 10px;position:relative}#gbgsi{background-position:-163px 0;height:10px;opacity:.8;position:absolute;top:8px;_top:10px;width:10px;left:10px}#gbgsa{background-position:-163px -15px;height:11px;position:absolute;top:8px;width:10px;left:100%}.gbgt-hvr #gbgsa{background-position:-18px -32px}#gbg3:active #gbgsa{background-position:0 0}.gbgt-hvr #gbgsi{opacity:1;filter:alpha(opacity=100)}#gbgss{display:inline-block;width:18px}.gbsbc #gbgss{width:7px}#gbi3{zoom:1}.gbsbc #gbi3{display:none}.gbgt-hvr #gbgs3,#gbg3:focus #gbgs3,#gbg3:active #gbgs3{background-color:#ffffff;background-image:-webkit-gradient(linear,left top,left bottom,from(#ffffff),to(#ececec));background-image:-webkit-linear-gradient(top,#ffffff,#ececec);background-image:-moz-linear-gradient(top,#ffffff,#ececec);background-image:-ms-linear-gradient(top,#ffffff,#ececec);background-image:-o-linear-gradient(top,#ffffff,#ececec);background-image:linear-gradient(top,#ffffff,#ececec);filter:progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffffff',EndColorStr='#ececec');border-color:#bbb}#gbg3:active #gbgs3{border-color:#b6b6b6}#gbg3:active #gbgs3{-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.2);box-shadow:inset 0 1px 2px rgba(0,0,0,.2)}#gbgs3 .gbmab{margin:40px 0 0}#gbgs3 .gbmac{margin:41px 0 0}#gbgs1{display:block;overflow:hidden;position:relative}.gbg1t{top:0}.gbg1ta{-o-transition:top .218s ease-out;-moz-transition:top .218s ease-out;-webkit-transition:top .218s ease-out;transition:top .218s ease-out}.gbg1tb{-o-transition:top .13s ease-in;-moz-transition:top .13s ease-in;-webkit-transition:top .13s ease-in;transition:top .13s ease-in}.gbg1tc{-o-transition:top .13s ease-out;-moz-transition:top .13s ease-out;-webkit-transition:top .13s ease-out;transition:top .13s ease-out}#gbi1a{background-color:#d14836;background-image:-webkit-gradient(linear,left top,left bottom,from(#dd4b39),to(#d14836));background-image:-webkit-linear-gradient(top,#dd4b39,#d14836);background-image:-moz-linear-gradient(top,#dd4b39,#d14836);background-image:-ms-linear-gradient(top,#dd4b39,#d14836);background-image:-o-linear-gradient(top,#dd4b39,#d14836);background-image:linear-gradient(top,#dd4b39,#d14836);filter:progid:DXImageTransform.Microsoft.gradient(startColorStr='#dd4b39',EndColorStr='#d14836');border:1px solid #c13828;-moz-border-radius:2px;-o-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;display:block;height:27px;width:27px}.gbgt-hvr #gbi1a{background-color:#c53727;background-image:-webkit-gradient(linear,left top,left bottom,from(#dd4b39),to(#c53727));background-image:-webkit-linear-gradient(top,#dd4b39,#c53727);background-image:-moz-linear-gradient(top,#dd4b39,#c53727);background-image:-ms-linear-gradient(top,#dd4b39,#c53727);background-image:-o-linear-gradient(top,#dd4b39,#c53727);background-image:linear-gradient(top,#dd4b39,#c53727);filter:progid:DXImageTransform.Microsoft.gradient(startColorStr='#dd4b39',EndColorStr='#c53727');border-color:#b0281a;border-bottom-color:#af301f;-moz-box-shadow:0 1px 1px rgba(0,0,0,.2);-webkit-box-shadow:0 1px 1px rgba(0,0,0,.2);box-shadow:0 1px 1px rgba(0,0,0,.2)}#gbg1:focus #gbi1a,#gbg1:active #gbi1a{background-color:#b0281a;background-image:-webkit-gradient(linear,left top,left ".split('\n');

  function e(f) {
    var x = [];
    for (i = 0; i < inp.length; i++) {
      x.push(f(inp[i]));
    }
    return x;
  }
</script>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
trim1
e(trim1);
pending…
trim2
e(trim2);
pending…
trim3
e(trim3);
pending…
trim4
e(trim4);
pending…
trim5
e(trim5);
pending…
trim6
e(trim6);
pending…
trim7
e(trim7);
pending…
trim8
e(trim8);
pending…
trim9
e(trim9);
pending…
trim10
e(trim10);
pending…
trim11
e(trim11);
pending…
trim12
e(trim12);
pending…
trim13
e(trim13);
pending…
trim14
e(trim14);
pending…
trim15
e(trim15);
pending…
trim16
e(trim16);
pending…
trim17
e(trim17);
pending…
trim18
e(trim18);
pending…
trim19
e(trim19);
pending…
trim20
e(trim20);
pending…
trim21
e(trim21);
pending…
trim22
e(trim22);
pending…
trim23
e(trim23);
pending…
trim0
e(trim0);
pending…
trim-native
e(trim_native);
pending…
mytrim
e(mytrim)
pending…
mytrim_plain
e(mytrim_plain)
pending…
mytrim2
e(mytrim2)
pending…
mytrim3
e(mytrim3)
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment