23rewfrghtw453tqrwasfergwq342refwarefw23qwefar32rew

JavaScript performance comparison

Test case created by Matt

Preparation code

 
<script>
Benchmark.prototype.setup = function() {
    var event = '{"header": {"memberId": -1, "time": 1360258783744, "server": "ela4-app1894", "service": "countserv-tomcat", "guid": [-127, 34, 42, -81, 30, -86, -64, -65, -67, -47, -57, -3, -38, -17, 7, -42], "treeId": null, "requestId": null, "impersonatorId": null}, "requestHeader": {"browserId": "", "sessionId": "", "ip": "189.215.179.13", "pageKey": "connect-lite-share-count", "path": "\/countserv\/count\/share", "locale": "es-ES,es;q=0.8", "referer": "http:\/\/www.slideshare.net\/Cemlire\/caracteristicas-y-estructura-de-la-noticia-0-3982843", "userAgent": "Mozilla\/5.0 (Windows NT 6.1; WOW64) AppleWebKit\/537.17 (KHTML, like Gecko) Chrome\/24.0.1312.57 Safari\/537.17"}, "pageType": "full", "errorMessageKey": null, "trackingCode": null, "trackingInfo": {"queryString": "url=http%3A%2F%2Fwww.slideshare.net%2FCemlire%2Fcaracteristicas-y-estructura-de-la-noticia-0-3982843&lang=en_US"}, "totalTime": 2}';
    var regex = /"ip": "([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})",/
};
</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
json
var json = {}, ip;
try{ json = JSON.parse(event)}
catch(e) {}
ip = json.requestHeader && json.requestHeader.ip;
 
pending…
regex
var match = event.match(regex) || [];
var ip = match[1];
pending…

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

Compare results of other browsers

0 comments

Add a comment