How time-intensive is the use of try
/catch
in JavaScript? I have an application and I am using it in a function which is called a few hundred times. N
You should take note of the following:
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
I've wasted time optimising sections of code that had little impact on performance. Make sure you know what is slow by running some timing experiments.