Empty array
JavaScript performance comparison
Info
Need to make sure the tests aren't operating on an empty array...
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"}];
};
Benchmark.prototype.teardown = function() {
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… 
new1 

pending… 
new1 

pending… 
for pop 

pending… 
reverse for pop 

pending… 
while pop variable 

pending… 
pop !== undefined 

pending… 
length pop 

pending… 
length shift 

pending… 
length > 0 pop 

pending… 
length > 0 shift 

pending… 
blind pop 

pending… 
blind shift 

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
 Revision 127: published
 Revision 128: published
 Revision 129: published
 Revision 130: published
 Revision 131: published
 Revision 132: published
 Revision 133: published by Tom
 Revision 134: published by Baz
 Revision 135: published
 Revision 136: published by cache object properties
 Revision 137: published by Devin
 Revision 138: published
 Revision 139: published
 Revision 141: published by joeytwiddle
 Revision 142: published
 Revision 143: published
 Revision 144: published
 Revision 145: published by Eric Brody
 Revision 147: published by David Scott and last updated
 Revision 148: published
 Revision 149: published by ui
 Revision 150: published by Philippe
 Revision 151: published by Philippe
 Revision 152: published
 Revision 153: published by Vasil Dimov
 Revision 154: published
 Revision 155: published
 Revision 157: published by Will
 Revision 158: published by Will
 Revision 159: published
 Revision 160: published by Nuno
 Revision 161: published
 Revision 162: published
 Revision 164: published by Maciej Kucharski
 Revision 165: published by MH
 Revision 166: published by muffin
 Revision 167: published
 Revision 168: published
 Revision 169: published
 Revision 170: published by Irmantas
 Revision 171: published by Irmantas
 Revision 172: published by tester
 Revision 173: published by Corbin
 Revision 174: published by Dallas62
 Revision 175: published
 Revision 176: published
 Revision 177: published by Michał Czernow
 Revision 178: published
 Revision 179: published
 Revision 181: published by CrunchyFrog
 Revision 182: published
 Revision 183: published by Shaun
 Revision 184: published by Philippe
0 comments
Comment form temporarily disabled.