Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.0.0
Chrome 134
Windows
Desktop
one month ago
Test name Executions per second
split 8921397.0 Ops/sec
Date toLocaleString without date being cached 232711.8 Ops/sec
slice 19438186.0 Ops/sec
substring 57292552.0 Ops/sec
Intl no format cache no date cache 6038.9 Ops/sec
Intl no format cache with date cache 5888.9 Ops/sec
Intl with format cache no date cache 261352.8 Ops/sec
Intl with format cache with date cache 315599.8 Ops/sec
Date toLocaleString with date being cached 266791.2 Ops/sec
Script Preparation code:
Tests:
  • split

  • Date toLocaleString without date being cached

  • slice

  • substring

  • Intl no format cache no date cache

  • Intl no format cache with date cache

  • Intl with format cache no date cache

  • Intl with format cache with date cache

  • Date toLocaleString with date being cached