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

Revision 7 of this benchmark created on


Preparation HTML

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

Test runner

Ready to run.

Testing in
TestOps/sec
1
var a;
                for(var i = 0;i < 999999;i++){
                        if(a){
                                a = i
                        }else{
                                a = i+2
                        }
                }
ready
2
var a;
                for(var i = 0;i < 999999;i++){
                        a?i:(i+2)
                }
ready

Revisions

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