[fpc-devel] FillWord, FillDWord and FillQWord are very poorly optimised on Win64 (not sure about x86-64 on Linux)

2017-10-31 Thread J. Gareth Moreton
So I've been doing some playing around recently, and noticed that while FillChar has some very fast internal code for initialising a block of memory, making use of non-temporal hints and memory fences, the versions for the larger types fall back to slow Pascal code. To showcase this, I ran a

Re: [fpc-devel] x86_64.inc CompareByte

2017-10-31 Thread C Western
On 31/10/17 11:47, Florian Klämpfl wrote: Am 30.10.2017 um 19:46 schrieb C Western: On 29/10/17 22:18, Florian Klämpfl wrote: I have committed your lastest patch with a few changes: the loop entry is aligned now to 16 bytes, I used movb instead of movbzl and inc instead of add. For me

Re: [fpc-devel] Multiple type sections - Far forward type declarations [feasible feature request?]

2017-10-31 Thread Sven Barth via fpc-devel
Am 31.10.2017 10:47 schrieb "Michael Van Canneyt" : On Tue, 31 Oct 2017, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: > >> >> With your extended "forward type resolution" this would no longer be >> possible. >> Theoretically it probably

Re: [fpc-devel] x86_64.inc CompareByte

2017-10-31 Thread Florian Klämpfl
Am 30.10.2017 um 19:46 schrieb C Western: > On 29/10/17 22:18, Florian Klämpfl wrote: >> >> I have committed your lastest patch with a few changes: the loop entry is >> aligned now to 16 bytes, I >> used movb instead of movbzl and inc instead of add. For me (Haswell CPU) >> this works better. I

Re: [fpc-devel] Multiple type sections - Far forward type declarations [feasible feature request?]

2017-10-31 Thread Michael Van Canneyt
On Tue, 31 Oct 2017, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: With your extended "forward type resolution" this would no longer be possible. Theoretically it probably can, but multiple passes would be needed. This would aversely affect the compiler

Re: [fpc-devel] Multiple type sections - Far forward type declarations [feasible feature request?]

2017-10-31 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: > Maybe some form of section folding (Type A ... Type B -> Type A, B) can be > done. Oops, I read over that :) ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] Multiple type sections - Far forward type declarations [feasible feature request?]

2017-10-31 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: > > With your extended "forward type resolution" this would no longer be possible. > Theoretically it probably can, but multiple passes would be needed. > This would aversely affect the compiler speed. Note that the example shows consecutive

Re: [fpc-devel] Multiple type sections - Far forward type declarations [feasible feature request?]

2017-10-31 Thread Mattias Gaertner
On Tue, 31 Oct 2017 09:46:52 +0100 (CET) Michael Van Canneyt wrote: >[...] > With your extended "forward type resolution" this would no longer be possible. > Theoretically it probably can, but multiple passes would be needed. > This would aversely affect the compiler

Re: [fpc-devel] Multiple type sections - Far forward type declarations [feasible feature request?]

2017-10-31 Thread Michael Van Canneyt
On Mon, 30 Oct 2017, Sandro Cumerlato wrote: Hello, please take a look at this small example: -- program types; type PMyTypeA = ^MyTypeA; PMyTypeB = ^MyTypeB; type MyTypeA = record foo: integer; bar: integer; end; type MyTypeB =