if statements vs optional chaining

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
if statements
if (job.tags && job.tags.export_id) {
    // do nothing
}
ready
optional chaining
if (job.tags?.export_id) {
    // do nothing
}
ready

Revisions

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