Test case name | Result |
---|---|
Moment diff to moment d | |
Moment new Date diff to moment d | |
Moment Date.now diff to moment d | |
Moment diff to precreated moment | |
e | |
Date.now minus date, division | |
moment Date.now diff to existing m | |
New Date() minus date, division | |
Moment diff to moment d, divide time | |
Math with moment and existing moment | |
Math with Date.now and moment | |
Math with new Date and m.toDate | |
Math with new Date and m | |
Math with Date.now and existing moment toDate |
Test name | Executions per second |
---|---|
Moment diff to moment d | 389256.9 Ops/sec |
Moment new Date diff to moment d | 373106.4 Ops/sec |
Moment Date.now diff to moment d | 341431.5 Ops/sec |
Moment diff to precreated moment | 496876.1 Ops/sec |
e | 432475.7 Ops/sec |
Date.now minus date, division | 1773400.6 Ops/sec |
moment Date.now diff to existing m | 417252.5 Ops/sec |
New Date() minus date, division | 1263623.9 Ops/sec |
Moment diff to moment d, divide time | 465468.8 Ops/sec |
Math with moment and existing moment | 686418.8 Ops/sec |
Math with Date.now and moment | 1395036.8 Ops/sec |
Math with new Date and m.toDate | 1253362.5 Ops/sec |
Math with new Date and m | 1049461.5 Ops/sec |
Math with Date.now and existing moment toDate | 1771037.6 Ops/sec |