Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2.1 Safari/605.1.15
Safari 17
Mac OS X 10.15.7
Desktop
11 months ago
Test name Executions per second
sort 391042.6 Ops/sec
localcompare 467322.6 Ops/sec
manual compare 356779.2 Ops/sec
date convert to date + sort a-b (timezone safe) 51377.4 Ops/sec
date convert to timestamp + sort (timezone safe) 105158.9 Ops/sec
Script Preparation code:
Tests:
  • sort

  • localcompare

  • manual compare

  • date convert to date + sort a-b (timezone safe)

  • date convert to timestamp + sort (timezone safe)