Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15
Safari 16
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
for..of destructured with Object.entries() 354.6 Ops/sec
for..of undestructured with Object.entries() 434.6 Ops/sec
for..in 509.2 Ops/sec
for..of destructured with Object.entries() (with prototype) 222.0 Ops/sec
for..of undestructured with Object.entries() (with prototype) 217.6 Ops/sec
for..in (with prototype) 230.9 Ops/sec
for..of destructured with map 853.4 Ops/sec
for..of undestructured with map 1213.6 Ops/sec
.forEach with Object.entries() 158.1 Ops/sec
.forEach with Object.entries() (with prototype) 344.6 Ops/sec
.forEach with map 4509.2 Ops/sec
Script Preparation code:
Tests:
  • for..of destructured with Object.entries()

  • for..of undestructured with Object.entries()

  • for..in

  • for..of destructured with Object.entries() (with prototype)

  • for..of undestructured with Object.entries() (with prototype)

  • for..in (with prototype)

  • for..of destructured with map

  • for..of undestructured with map

  • .forEach with Object.entries()

  • .forEach with Object.entries() (with prototype)

  • .forEach with map