Script Preparation code:
x
 
var x = new Date('5/11/2018');
var y = new Date('5/11/2018');
var dateOptions = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
var dateTimeFormat = new Intl.DateTimeFormat('en-US', dateOptions);
Tests:
  • without Intl.DateTimeFormat

     
    var z = (x.getFullYear() === y.getFullYear() && x.getMonth() === y.getMonth() && x.getDate() === y.getDate());
  • with Intl.DateTimeFormat

     
    var z = (dateTimeFormat.format(x) === dateTimeFormat.format(y));
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    without Intl.DateTimeFormat
    with Intl.DateTimeFormat

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 12 days ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36
Chrome 136 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
without Intl.DateTimeFormat 35811964.0 Ops/sec
with Intl.DateTimeFormat 668531.1 Ops/sec