Date vs split

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Date
const d = new Date('2018-11-6')
const time = d.getTime()
ready
Split
const [yearString, monthString, dayString] = '2018-11-6'.split('-')
const year = Number(yearString)
const month = Number(monthString)
const day = Number(dayString)
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.