Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Chrome 106
Linux
Desktop
2 years ago
Test name Executions per second
const x = parseJSON("2022-10-20T03:24:21.127+0800"); 1388370.4 Ops/sec
const y = new Date(Date.parse(str)); 2838199.0 Ops/sec
const z = new Date(Number("1666207461127.182")); 4695802.0 Ops/sec
Tests:
  • Convert string to date using native Date.parse then get ms offset

  • Convert string epochms and get ms offset


;