isNaN - date vs date.valueOf (v2)

Revision 2 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
with valueOf
const date = new Date();
isNaN(date?.valueOf());
ready
just date
const date = new Date();
isNaN(date);
ready
just wrong date
const date = new Date("hihi");
isNaN(date);
ready
wrong date with valueOf
const date = new Date("haha");
isNaN(date?.valueOf());
ready

Revisions

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