Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0.1 Safari/605.1.15
Safari 26
Mac OS X 10.15.7
Desktop
6 months ago
Test name Executions per second
Always new instance 28431.7 Ops/sec
static global instance 1584848.4 Ops/sec
Lodash cache 1044699.2 Ops/sec
Custom cache with maps 1681499.9 Ops/sec
Custom cache with objects 1484761.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Always new instance

  • static global instance

  • Lodash cache

  • Custom cache with maps

  • Custom cache with objects