Empty array
JavaScript performance comparison
Preparation code
<script>
Benchmark.prototype.setup = function() {
var arr = [{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"},{a: 1, b: "2"}];
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
Test  Ops/sec  

length 

pending… 
splice 

pending… 
pop 

pending… 
shift 

pending… 
pop (truthy) 

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:
 Revision 1: published
 Revision 2: published by Simon
 Revision 3: published by huang47
 Revision 4: published
 Revision 6: published
 Revision 9: published
 Revision 10: published
 Revision 11: published
 Revision 14: published
 Revision 15: published
 Revision 21: published by Allan
 Revision 22: published
 Revision 23: published
 Revision 24: published
 Revision 26: published by eTagTechnologies.Inc
 Revision 28: published by Isaac
 Revision 29: published
 Revision 30: published
 Revision 31: published by Tom Taylor
 Revision 32: published
 Revision 34: published
 Revision 36: published
 Revision 37: published
 Revision 39: published
 Revision 40: published
 Revision 41: published
 Revision 42: published by Ryan
 Revision 43: published by ly tran
 Revision 44: published
 Revision 45: published
 Revision 46: published
 Revision 49: published
 Revision 50: published
 Revision 52: published by Tim Tucker
 Revision 53: published by TimTucker
 Revision 54: published
 Revision 55: published
 Revision 59: published
 Revision 60: published by Madevilts
 Revision 61: published
 Revision 62: published
 Revision 64: published
 Revision 66: published
 Revision 67: published
 Revision 70: published by Nickdouille
 Revision 71: published
 Revision 72: published by Johan Telstad
 Revision 73: published
 Revision 74: published by Johan Telstad
 Revision 75: published by Mario
 Revision 76: published by Adri
 Revision 78: published by Ray Brooks
 Revision 80: published
 Revision 81: published
 Revision 82: published
 Revision 83: published
 Revision 85: published
 Revision 86: published
 Revision 87: published by Jasper
 Revision 88: published
 Revision 89: published
 Revision 90: published
 Revision 91: published
 Revision 92: published
 Revision 93: published
 Revision 94: published
 Revision 96: published
 Revision 97: published
 Revision 98: published
 Revision 99: published
 Revision 100: published
 Revision 101: published
 Revision 102: published
 Revision 103: published by Justin Ormont
 Revision 104: published
 Revision 105: published
 Revision 106: published
 Revision 107: published
 Revision 108: published
 Revision 109: published by Alex Paluzzi
 Revision 110: published by John Smith
 Revision 111: published by Russell Dempsey
 Revision 112: published
 Revision 113: published
 Revision 114: published by Kiren
 Revision 115: published
 Revision 116: published
 Revision 117: published
 Revision 118: published
 Revision 119: published
 Revision 120: published
 Revision 121: published by jfeldt
 Revision 122: published by Mientjan
 Revision 123: published
 Revision 124: published
 Revision 125: published by MR
 Revision 126: published
0 comments