Run details:
Mozilla/5.0 (Linux; Android 13; Pixel 6a) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Mobile Safari/537.36
Chrome Mobile 108
Android
Mobile
2 years ago
Test name Executions per second
.map(callback) - 1 000 elements 290265.3 Ops/sec
.fill(value) - 1 000 elements 63957.6 Ops/sec
.map(callback) - 10 000 elements 29104.1 Ops/sec
.fill(value) - 10 000 elements 8637.2 Ops/sec
.map(callback) - 100 000 elements 1125.8 Ops/sec
.fill(value) - 100 000 elements 556.1 Ops/sec
Script Preparation code:
Tests:
  • .map(callback) - 1 000 elements

  • .fill(value) - 1 000 elements

  • .map(callback) - 10 000 elements

  • .fill(value) - 10 000 elements

  • .map(callback) - 100 000 elements

  • .fill(value) - 100 000 elements