[fpc-pascal] $IMPLICITEXCEPTIONS vs early function return

Jonas Maebe jonas at freepascal.org
Sat Jul 15 15:18:37 CEST 2023


On 15/07/2023 04:25, Hairy Pixels via fpc-pascal wrote:
> The manual says it makes all functions slower, 5-10%?? Does that apply to all functions or just ones with managed types in them? It's also curious why the try..finally block would have the kind of impact, all it does is call finalize functions on managed types right?

It also sets up an exception frame. FPC uses setjmp/longjmp for that, 
which means that while restoring everything when an exception happens is 
fast, saving the exception frame itself is relatively slow.


Jonas


More information about the fpc-pascal mailing list