Re: [fpc-devel] Plans for 2022

2022-01-09 Thread Ryan Joseph via fpc-devel
> On Jan 9, 2022, at 2:09 PM, J. Gareth Moreton via fpc-devel > wrote: > > https://www.patreon.com/posts/60922821 Your plans are vectorization are an important gain for linear algebra and games. Could you detect things like: var a, b, c: TVec2; begin c := a + b * V2(10, 10); where

Re: [fpc-devel] @Gareth - Feedback on optimizations

2022-01-09 Thread Martin Frb via fpc-devel
On 09/01/2022 19:04, Florian Klämpfl via fpc-devel wrote: Am 09.01.2022 um 18:59 schrieb Martin Frb via fpc-devel : Just thought this may be interesting. Though the results are for "eyeballing" at best -- see the video linked in Jonas' recent mail:

Re: [fpc-devel] @Gareth - Feedback on optimizations

2022-01-09 Thread Florian Klämpfl via fpc-devel
> Am 09.01.2022 um 18:59 schrieb Martin Frb via fpc-devel > : > > Just thought this may be interesting. > Though the results are for "eyeballing" at best -- see the video linked in > Jonas' recent mail: > https://lists.freepascal.org/pipermail/fpc-devel/2022-January/044336.html > > I run my

[fpc-devel] @Gareth - Feedback on optimizations

2022-01-09 Thread Martin Frb via fpc-devel
Just thought this may be interesting. Though the results are for "eyeballing" at best -- see the video linked in Jonas' recent mail: https://lists.freepascal.org/pipermail/fpc-devel/2022-January/044336.html I run my FpDebug test case with 3.2.3 and 3.3.1 (both early Dec) The test runs about

Re: [fpc-devel] Double-checking an optimisation

2022-01-09 Thread J. Gareth Moreton via fpc-devel
On 09/01/2022 15:28, Martin Frb via fpc-devel wrote: Btw, have you seen this? https://www.agner.org/optimize/optimizing_assembly.pdf Page 70, it says that under some conditions a branch may be faster than a conditional move. I'm definitely saving a local copy of that!  It could prove

Re: [fpc-devel] Double-checking an optimisation

2022-01-09 Thread Martin Frb via fpc-devel
On 09/01/2022 04:53, J. Gareth Moreton via fpc-devel wrote: On 09/01/2022 01:47, Martin Frb via fpc-devel wrote: I take it, it also is one (or two?) bytes longer? If that is in a loop, which otherwise is exactly within a 32 byte aligned block, then that could cause a slow down too. (If the

Re: [fpc-devel] Double-checking an optimisation

2022-01-09 Thread Florian Klämpfl via fpc-devel
> Am 09.01.2022 um 15:08 schrieb J. Gareth Moreton via fpc-devel > : > > On 09/01/2022 12:35, Florian Klämpfl via fpc-devel wrote: >>> It removes a jump and a label, which might permit other long-range >>> optimisations, but it's 3 instructions that are in a dependency chain. >> >> Didn't

Re: [fpc-devel] Double-checking an optimisation

2022-01-09 Thread J. Gareth Moreton via fpc-devel
On 09/01/2022 12:35, Florian Klämpfl via fpc-devel wrote:   It removes a jump and a label, which might permit other long-range optimisations, but it's 3 instructions that are in a dependency chain. Didn't you implement something which transformed the code above in   xorl    %ebx,%ebx  

Re: [fpc-devel] Plans for 2022

2022-01-09 Thread J. Gareth Moreton via fpc-devel
The other slight difficulty is that because I'm looking at the direct assembly langauge, I'm not always sure what Pascal code produces said assembly language.  Granted that's because I tend to dump the assembly files without the -al option, and I only tend to use the -ar option if there's some

Re: [fpc-devel] Plans for 2022

2022-01-09 Thread J. Gareth Moreton via fpc-devel
It's probably a good idea, yes.  Normally the optimisations I implement are due to me spotting something in the RTL or compiler disassembly while optimising something else, so the tests per se are in those units.  Dedicated tests, like my recently added POPCNT tests, are a good idea even if

Re: [fpc-devel] Double-checking an optimisation

2022-01-09 Thread Florian Klämpfl via fpc-devel
Am 09.01.2022 um 01:37 schrieb J. Gareth Moreton via fpc-devel: Hi everyone, So a merge request of mine was just approved that allows the peephole optimizer access to more registers when it needs one for temporary storage.  It allows it to make an optimisation on x86_64-win64 that wasn't

Re: [fpc-devel] Plans for 2022

2022-01-09 Thread Florian Klämpfl via fpc-devel
> Am 09.01.2022 um 08:09 schrieb J. Gareth Moreton via fpc-devel > : > > Some people requested a Patreon post as to my plans for 2022 with FPC, so I > was happy to oblige. Plans may change a bit though depending on what happens > in life and also what Florian's own vision is with the

Re: [fpc-devel] Plans for 2022

2022-01-09 Thread Christo Crause via fpc-devel
On Sun, Jan 9, 2022 at 9:09 AM J. Gareth Moreton via fpc-devel < fpc-devel@lists.freepascal.org> wrote: > Some people requested a Patreon post as to my plans for 2022 with FPC, > so I was happy to oblige. Plans may change a bit though depending on > what happens in life and also what Florian's