Useful theory. I'll take a read. Thank you again.
Gareth aka. Kit
On 03/10/2020 19:14, Jonas Maebe via fpc-devel wrote:
On 03/10/2020 18:43, J. Gareth Moreton via fpc-devel wrote:
Sounds like a fun thing to research, that's for sure. Thanks Jonas.
I'm under the impression that exception co
On 03/10/2020 18:43, J. Gareth Moreton via fpc-devel wrote:
> Sounds like a fun thing to research, that's for sure. Thanks Jonas.
>
> I'm under the impression that exception code tends to be separated
> anyway, so it can't easily be separated much further.
Implicit exception code, yes, but expli
Sounds like a fun thing to research, that's for sure. Thanks Jonas.
I'm under the impression that exception code tends to be separated
anyway, so it can't easily be separated much further. Code that checks
"IOResult" though could be possibly marked as cold code, so long as it
isn't too large
On 01/10/2020 18:37, J. Gareth Moreton via fpc-devel wrote:
> On a similar topic, one person mentioned that GCC and other compilers
> sometimes 'outline' conditional branches by effectively moving the
> branch into a nested procedure in order to help with caching.by giving
> the main procedure a sm
Ah crumbs, I thought it was too easy! I can't believe I missed the
obvious there! Not much of a saving if it has to store the return
address somewhere (mov @return(%rip),%rcx; mov %rcx, (somewhere on the
stack)).
The advantage would be reducing the chance of additional memory caching
since
On 01/10/2020 23:22, J. Gareth Moreton via fpc-devel wrote:
In a way, yes, but not quite the same, since multiple calls to the
nested function would still redirect to the same block of code rather
than being inlined at each call. I suppose more similar to the old
GOSUB; RETURN combination in o
In a way, yes, but not quite the same, since multiple calls to the
nested function would still redirect to the same block of code rather
than being inlined at each call. I suppose more similar to the old
GOSUB; RETURN combination in old versions of Basic, and the nested
routine slotted either
> On Oct 1, 2020, at 10:37 AM, J. Gareth Moreton via fpc-devel
> wrote:
>
> In situations where a nested function has no parameters, is it feasible and
> beneficial to programmatically merge it into the main procedure
What do you mean by "merge"? Like inlining?
Regards,
Ryan Joseph
Hi everyone,
This is an idea that sprung to mind while looking at fixing an unrelated
bug, and that's to do with nested functions.
In situations where a nested function has no parameters, is it feasible
and beneficial to programmatically merge it into the main procedure in
some circumstances