Re: [fpc-devel] Experimentation: "Branch stitching"

2022-11-28 Thread Martin Frb via fpc-devel
On 28/11/2022 16:37, Martin Frb via fpc-devel wrote: "11.3μop cache" Apart from the qop cache there is the normal loading into the cache. I must admit I am not sure on the exact workings, but wasn't there something like loading entire cachelines?  If that is so (not sure), then of course

Re: [fpc-devel] Experimentation: "Branch stitching"

2022-11-28 Thread Martin Frb via fpc-devel
On 28/11/2022 16:19, J. Gareth Moreton via fpc-devel wrote: I admit I can be disorganised sometimes and lose documents, so I apologise if you have sent them already and I mislaid them in my mess of a directory tree.  Believe me though, I want to swallow all of this up if it means squeezing out

Re: [fpc-devel] Experimentation: "Branch stitching"

2022-11-28 Thread J. Gareth Moreton via fpc-devel
I admit I can be disorganised sometimes and lose documents, so I apologise if you have sent them already and I mislaid them in my mess of a directory tree.  Believe me though, I want to swallow all of this up if it means squeezing out every cycle I can out of the generated machine code!

Re: [fpc-devel] Experimentation: "Branch stitching"

2022-11-28 Thread Martin Frb via fpc-devel
On 28/11/2022 14:32, J. Gareth Moreton via fpc-devel wrote: On 28/11/2022 12:59, Martin Frb via fpc-devel wrote: Well first of all, you didn't move the balign in front of .Lj732 I do move the alignment hints, but if the label becomes dead (due to the zero-distance jump being 'collapsed'),

Re: [fpc-devel] Sorting tests

2022-11-28 Thread Sven Barth via fpc-devel
Stefan Glienke via fpc-devel schrieb am Mo., 28. Nov. 2022, 12:39: > In Delphi that would be the > https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.GetTypeKind > intrinsic - I could not find that one in the 3.2.0 feature list. > That one is also supported since 3.2.0, though it

Re: [fpc-devel] Experimentation: "Branch stitching"

2022-11-28 Thread J. Gareth Moreton via fpc-devel
On 28/11/2022 12:59, Martin Frb via fpc-devel wrote: On 28/11/2022 07:22, J. Gareth Moreton via fpc-devel wrote: ...     testb   %al,%al     je .Lj733     subb    $1,%al     je     .Lj734     jmp    .Lj732     .balign 16,0x90 .Lj733:     ...     jmp    .Lj718     .balign 16,0x90 .Lj732:     

Re: [fpc-devel] Experimentation: "Branch stitching"

2022-11-28 Thread Martin Frb via fpc-devel
On 28/11/2022 07:22, J. Gareth Moreton via fpc-devel wrote: ...     testb   %al,%al     je .Lj733     subb    $1,%al     je     .Lj734     jmp    .Lj732     .balign 16,0x90 .Lj733:     ...     jmp    .Lj718     .balign 16,0x90 .Lj732:     movl    $2019050530,%ecx     call   

Re: [fpc-devel] Sorting tests

2022-11-28 Thread J. Gareth Moreton via fpc-devel
That could work - could be interesting to experiment with. Kit On 28/11/2022 11:43, Stefan Glienke via fpc-devel wrote: Nevermind - I guess there is: https://www.freepascal.org/docs-html/rtl/system/gettypekind.html Am 28.11.2022 um 12:35 schrieb Stefan Glienke via fpc-devel: In Delphi

Re: [fpc-devel] Sorting tests

2022-11-28 Thread Stefan Glienke via fpc-devel
Nevermind - I guess there is: https://www.freepascal.org/docs-html/rtl/system/gettypekind.html Am 28.11.2022 um 12:35 schrieb Stefan Glienke via fpc-devel: In Delphi that would be the https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.GetTypeKind intrinsic - I could not find

Re: [fpc-devel] Sorting tests

2022-11-28 Thread Stefan Glienke via fpc-devel
In Delphi that would be the https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.GetTypeKind intrinsic - I could not find that one in the 3.2.0 feature list. Am 28.11.2022 um 11:17 schrieb J. Gareth Moreton via fpc-devel: Well that spoils that idea!  Is there any way to determine

Re: [fpc-devel] Sorting tests

2022-11-28 Thread J. Gareth Moreton via fpc-devel
Well that spoils that idea!  Is there any way to determine if it's pointer-based so you can swap references instead of going through the whole penalty of creating and destroying temporary objects? Kit On 28/11/2022 10:07, Sven Barth wrote: J. Gareth Moreton via fpc-devel schrieb am Mo., 28.

Re: [fpc-devel] Sorting tests

2022-11-28 Thread Sven Barth via fpc-devel
J. Gareth Moreton via fpc-devel schrieb am Mo., 28. Nov. 2022, 11:01: > Just want to clarify something... if a type is managed, can it be safely > typecast to a pointer in all instances and on all platforms? (The > purpose being so if I wanted to swap two items, so there's no overall > change in

Re: [fpc-devel] Sorting tests

2022-11-28 Thread J. Gareth Moreton via fpc-devel
This is something I want to experiment with now.  Still waiting on approval of the TArrayHelper sort merge request though before I start playing around with reference counts. Just want to clarify something... if a type is managed, can it be safely typecast to a pointer in all instances and on

Re: [fpc-devel] Sorting tests

2022-11-28 Thread Michael Van Canneyt via fpc-devel
On Mon, 28 Nov 2022, Sven Barth via fpc-devel wrote: Stefan Glienke via fpc-devel schrieb am Mo., 28. Nov. 2022, 00:20: Probably not unless FPC has something similar to https://docwiki.embarcadero.com/Libraries/Alexandria/en/System.IsManagedType (that function among a few others is