What is faster: try catch vs Promise
问题 I heard such an opinion that you should avoid usage of try/catch at all because it takes many resources. So could promise error handling could be faster? Or it does not matter at all? function f(somethingDangerous) { return new Promise((resolve, reject) => { // try { // somethingDangerous(); // resolve(); // } catch (err) { // reject(err); // } // VS somethingDangerous(); resolve(); }).catch((err) => { console.error('Catched: ' + err); }); } f(() => {throw 'DANGEROUS THING';}); UPD : I know