node | memory | cpu |
v0.10.29 | 8.59 GB | Intel(R) Core(TM) i5-2500S CPU @ 2.70GHz |
For loop basic | 172,551 ops/sec ±13.28% (35 runs sampled) |
While loop basic | 170,021 ops/sec ±12.00% (33 runs sampled) |
For loop cached | 202,323 ops/sec ±8.14% (36 runs sampled) |
For loop i-- | 42,893 ops/sec ±7.30% (44 runs sampled) |
Do-while loop i-- | 119,168 ops/sec ±6.02% (65 runs sampled) |
Do-while loop --i | 87,389 ops/sec ±1.41% (83 runs sampled) |
For..in loop | 9,865 ops/sec ±1.50% (87 runs sampled) |
Array#forEach | 24,579 ops/sec ±0.70% (80 runs sampled) |
underscore#each | 24,530 ops/sec ±1.18% (90 runs sampled) |
lodash#each | 68,883 ops/sec ±1.36% (87 runs sampled) |
shift valid | 26,169 ops/sec ±1.06% (88 runs sampled) |
pop valid | 114,357 ops/sec ±1.20% (86 runs sampled) |
Notes:
- Fastest is For loop cached,For loop basic
node | memory | cpu |
v0.10.30 | 519 MB | QEMU Virtual CPU version 1.0 |
For loop basic | 14,909 ops/sec ±4.53% (49 runs sampled) |
While loop basic | 15,016 ops/sec ±5.94% (57 runs sampled) |
For loop cached | 24,511 ops/sec ±3.31% (67 runs sampled) |
For loop i-- | 3,958 ops/sec ±4.99% (23 runs sampled) |
Do-while loop i-- | 12,904 ops/sec ±3.35% (51 runs sampled) |
Do-while loop --i | 8,910 ops/sec ±7.39% (40 runs sampled) |
For..in loop | 1,234 ops/sec ±1.09% (23 runs sampled) |
Array#forEach | 3,185 ops/sec ±9.58% (45 runs sampled) |
underscore#each | 3,696 ops/sec ±0.95% (35 runs sampled) |
lodash#each | 16,138 ops/sec ±5.58% (85 runs sampled) |
shift valid | 8,857 ops/sec ±2.15% (89 runs sampled) |
pop valid | 39,073 ops/sec ±1.22% (86 runs sampled) |
Notes:
- Fastest is pop valid
node | memory | cpu |
v0.10.29 | 8.30 GB | Intel(R) Core(TM) i5-4200M CPU @ 2.50GHz |
For loop basic | 185,947 ops/sec ±16.45% (32 runs sampled) |
While loop basic | 164,200 ops/sec ±15.83% (24 runs sampled) |
For loop cached | 218,918 ops/sec ±12.13% (37 runs sampled) |
For loop i-- | 29,449 ops/sec ±10.82% (35 runs sampled) |
Do-while loop i-- | 99,298 ops/sec ±10.20% (51 runs sampled) |
Do-while loop --i | 76,253 ops/sec ±4.43% (69 runs sampled) |
For..in loop | 8,295 ops/sec ±6.07% (62 runs sampled) |
Array#forEach | 24,476 ops/sec ±5.22% (81 runs sampled) |
underscore#each | 25,298 ops/sec ±2.72% (89 runs sampled) |
lodash#each | 62,495 ops/sec ±3.93% (82 runs sampled) |
shift valid | 24,220 ops/sec ±5.78% (87 runs sampled) |
pop valid | 113,093 ops/sec ±3.51% (82 runs sampled) |
Notes:
- Fastest is For loop cached,For loop basic
node | memory | cpu |
v0.11.13 | 4.29 GB | Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz |
For loop basic | 333,172 ops/sec ±9.49% (46 runs sampled) |
While loop basic | 350,422 ops/sec ±9.32% (53 runs sampled) |
For loop cached | 417,386 ops/sec ±7.49% (61 runs sampled) |
For loop i-- | 103,999 ops/sec ±5.71% (59 runs sampled) |
Do-while loop i-- | 500,405 ops/sec ±2.89% (81 runs sampled) |
Do-while loop --i | 168,926 ops/sec ±1.67% (91 runs sampled) |
For..in loop | 8,418 ops/sec ±1.70% (95 runs sampled) |
Array#forEach | 20,569 ops/sec ±1.58% (91 runs sampled) |
underscore#each | 20,132 ops/sec ±2.58% (92 runs sampled) |
lodash#each | 87,349 ops/sec ±2.17% (90 runs sampled) |
shift valid | 5,980 ops/sec ±0.82% (96 runs sampled) |
pop valid | 176,230 ops/sec ±1.37% (89 runs sampled) |
Notes:
- Fastest is Do-while loop i--
node | memory | cpu |
v0.11.13 | 8.59 GB | Intel(R) Core(TM) i5-2500S CPU @ 2.70GHz |
For loop basic | 169,683 ops/sec ±11.35% (25 runs sampled) |
While loop basic | 184,290 ops/sec ±10.39% (26 runs sampled) |
For loop cached | 234,339 ops/sec ±8.77% (34 runs sampled) |
For loop i-- | 67,891 ops/sec ±5.76% (37 runs sampled) |
Do-while loop i-- | 353,296 ops/sec ±5.85% (55 runs sampled) |
Do-while loop --i | 168,568 ops/sec ±1.54% (86 runs sampled) |
For..in loop | 8,969 ops/sec ±1.16% (91 runs sampled) |
Array#forEach | 21,557 ops/sec ±1.17% (92 runs sampled) |
underscore#each | 21,562 ops/sec ±1.45% (87 runs sampled) |
lodash#each | 89,358 ops/sec ±0.91% (99 runs sampled) |
shift valid | 5,839 ops/sec ±1.52% (85 runs sampled) |
pop valid | 183,027 ops/sec ±0.36% (100 runs sampled) |
Notes:
- Fastest is Do-while loop i--
node | memory | cpu |
v0.10.31 | 8.59 GB | Intel(R) Core(TM) i5-2500S CPU @ 2.70GHz |
For loop basic | 156,976 ops/sec ±18.34% (28 runs sampled) |
While loop basic | 168,397 ops/sec ±16.82% (28 runs sampled) |
For loop cached | 196,143 ops/sec ±14.56% (34 runs sampled) |
For loop i-- | 41,603 ops/sec ±15.16% (50 runs sampled) |
Do-while loop i-- | 140,002 ops/sec ±6.86% (71 runs sampled) |
Do-while loop --i | 89,851 ops/sec ±3.10% (90 runs sampled) |
For..in loop | 10,801 ops/sec ±1.17% (89 runs sampled) |
Array#forEach | 24,575 ops/sec ±0.74% (93 runs sampled) |
underscore#each | 25,541 ops/sec ±1.01% (92 runs sampled) |
lodash#each | 69,962 ops/sec ±1.57% (90 runs sampled) |
shift valid | 25,117 ops/sec ±0.88% (91 runs sampled) |
pop valid | 111,591 ops/sec ±1.02% (87 runs sampled) |
Notes:
- Fastest is For loop cached,While loop basic