Re:A function decorator that rewrites the bytecode to enable...
by zweice on Tuesday September 21, 2021 @01:16AM
(#28602229)
Is that faster than (or comparable to) raising an Error in the inner loop and catching it outside the outer loop?
[ Parent
| on HN ]
Re:A function decorator that rewrites the bytecode to enable...
by loa_in_ on Tuesday September 21, 2021 @02:14AM
(#28602443)
Internal error bubbling code is slow and can change from release to release. And it's definitely not intended for the job.
Re:A function decorator that rewrites the bytecode to enable...
by simion314 on Tuesday September 21, 2021 @02:40AM
(#28602554)
probably 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.