Test name | Executions per second |
---|---|
A | 3478622.5 Ops/sec |
B | 3552254.8 Ops/sec |
function a() {
try {
const result = JSON.parse('{"asdf": 5}');
if (result.asdf) {
return true;
}
throw new Error('Wow');
} catch (err) {
return false;
}
}
function b() {
const result = JSON.parse('{"asdf": 5}');
if (result.asdf) {
return true;
}
return false;
}
a();
b();