HTML Preparation code:
AخA
 
1
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/dayjs.min.js"></script>
2
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/locale/ja.js"></script>
Tests:
  • native replaceAll

     
    (new Date('2023-06-12T17:05:31.000000Z')).toLocaleDateString('ja-JP', {year:'numeric', month:'2-digit', day:'2-digit'}).replaceAll('/', '')
  • native replace

     
    (new Date('2023-06-12T17:05:31.000000Z')).toLocaleDateString('ja-JP', {year:'numeric', month:'2-digit', day:'2-digit'}).replace('/\//g', '')
  • dayjs

     
    dayjs('2023-06-12T17:05:31.000000Z').locale('ja').format('YYYYMMDD')
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    native replaceAll
    native replace
    dayjs

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0
Chrome 119 on Windows
View result in a separate tab
Test name Executions per second
native replaceAll 20630.7 Ops/sec
native replace 20386.4 Ops/sec
dayjs 357811.8 Ops/sec