Map vs preallocation

3 years ago
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.101 Safari/537.36
Test name Executions per second
Map 63.0 Ops/sec
Preallocation 434.1 Ops/sec
Script Preparation code:
Tests:
  • Map

  • Preallocation

Open this result on MeasureThat.net