3 ms·
Is that faster than (or comparable to) raising an Error in the inner loop and catching it outside the outer loop?
by zweice 5y ago
Is that faster than (or comparable to) raising an Error in the inner loop and catching it outside the outer loop?
- loa_in_ 5y agoInternal error bubbling code is slow and can change from release to release. And it's definitely not intended for the job.
- simion314 5y agoprobably faster since it was built for this purpose, throwing an error would have to at least create an exception object, then create stack trace and the other setup stuff. As i said I code for almost 20 years and I only had to use it once so far, but people that maybe work a lot more with stuff that needs a lot of performance might use it much more often.