Permalink
Browse files

Add date-fns benchmark

  • Loading branch information...
jd20 committed Feb 1, 2019
1 parent c9e518f commit a273bf49ab63abc5c634616c53b4cfc567878811
Showing with 11 additions and 1 deletion.
  1. +4 −0 bench.js
  2. +2 −1 package.json
  3. +5 −0 yarn.lock
@@ -1,5 +1,6 @@
const benchmark = require('benchmark')
const chalk = require('chalk')
const dateFns = require('date-fns')
const moment = require('moment')
const timetable = require('./index')

@@ -55,4 +56,7 @@ newSuite('diff')
.add('moment (reuse)', function () {
moment1.diff(moment2, 'days')
})
.add('date-fns', function () {
dateFns.differenceInCalendarDays(new Date(2019, 8, 17), new Date(1912, 3, 14))
})
.run()
@@ -23,6 +23,7 @@
},
"devDependencies": {
"benchmark": "^2.1.4",
"chalk": "^2.4.2"
"chalk": "^2.4.2",
"date-fns": "^1.30.1"
}
}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit a273bf4

Please sign in to comment.