HTML Preparation code:
Script Preparation code:
Tests:

Historical Performance Data aggregated from 5 community runs

Desktop Results:
Chrome 5 runs
static global instance
2.5M/s
Custom cache with maps
2.5M/s
Custom cache with objects
1.7M/s
Lodash cache
1.1M/s
Always new instance
69K/s

Fastest: static global instance (36.7x faster)

View exact numbers
  • static global instance: 2,528,241 ops/sec
  • Custom cache with maps: 2,455,811 ops/sec
  • Custom cache with objects: 1,727,712 ops/sec
  • Lodash cache: 1,149,347 ops/sec
  • Always new instance: 68,960 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Always new instance
    static global instance
    Lodash cache
    Custom cache with maps
    Custom cache with objects

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 9 months ago)
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 on Mac OS X 10.15.7
View result in a separate tab
Custom cache with maps
1.7M/s
static global instance
1.6M/s
Custom cache with objects
1.5M/s
Lodash cache
1.0M/s
Always new instance
28K/s
View exact numbers
Test name Executions per second
Custom cache with maps 1,681,500 Ops/sec
static global instance 1,584,848 Ops/sec
Custom cache with objects 1,484,761 Ops/sec
Lodash cache 1,044,699 Ops/sec
Always new instance 28,432 Ops/sec