date.now() vs new Date() (v4)

Revision 4 of this benchmark created by Andrey Kovalenko on


Preparation HTML

<script>
var nowAlias = Date.now();
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
new Date()
var x = new Date();
ready
Date.now()
var x = Date.now();
ready
new Date(new Date())
var x = new Date(new Date());
ready
var x  = new Date(nowAlias);
ready

Revisions

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