get time vs unary plus (v12)

Revision 12 of this benchmark created on


Setup

var now = new Date();

Test runner

Ready to run.

Testing in
TestOps/sec
getTime
var t = now.getTime();
ready
unary plus
var t = +now;
ready
getTime on new Date()
var t = (new Date()).getTime();
ready
unary + on new Date()
var t = +new Date();
ready
unary + on new Date
var t = +new Date;
ready

Revisions

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