title: What is faster: try catch vs Promise
body: <p>I heard such an opinion that you should avoid usage of try/catch at all because it takes many resources. So could the promise error handling to be faster? Or it does not matter at all?</p>
  
  <pre><code>function f(somethingDangerous) {
    return new Promise((resolve, reject) =&gt; {
      // try {
      //   somethingDangerous();
      //   resolve();
      // } catch (err) {
      //   reject(err);
      // }
  
      // VS
  
      somethingDangerous();
      resolve();
    }).catch((err) =&gt; {
      console.error('Catched: ' + err);
    });
  }
  
  f(() =&gt; {throw 'DANGEROUS THING';});
  </code></pre>
  
  <p><strong>UPD</strong>: I know that try/catch won't work with async code inside. I'm just wondering if there any reasons to avoiding of try/catch because of performance issues? And is there any difference between the two approaches above?</p>
  
  <p><strong>UPD2</strong>: Tried to race my horses :) <a href="https://jsperf.com/try-catch-vs-promise" rel="nofollow noreferrer">https://jsperf.com/try-catch-vs-promise</a></p>