summaryrefslogtreecommitdiff
path: root/date-fns/src/toDate/benchmark.js
diff options
context:
space:
mode:
Diffstat (limited to 'date-fns/src/toDate/benchmark.js')
-rw-r--r--date-fns/src/toDate/benchmark.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/date-fns/src/toDate/benchmark.js b/date-fns/src/toDate/benchmark.js
new file mode 100644
index 0000000..290d5d3
--- /dev/null
+++ b/date-fns/src/toDate/benchmark.js
@@ -0,0 +1,16 @@
+// @flow
+/* eslint-env mocha */
+/* global suite, benchmark */
+
+import toDate from '.'
+import moment from 'moment'
+
+suite('toDate', function() {
+ benchmark('date-fns', function() {
+ return toDate(539980200000)
+ })
+
+ benchmark('Moment.js', function() {
+ return moment(539980200000)
+ })
+})