console.assert

Benchmark created on


Description

Is console.assert really slow even the condition is true?

Test runner

Ready to run.

Testing in
TestOps/sec
Test console.assert
for (let i=0; i<10000000; i++) {
	console.assert(i!=1000000);
}
ready
Test homemade assert
for (let i=0; i<10000000; i++) {
  if(!(i!=1000000)) console.log("ASSERT");
}
ready

Revisions

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