[fpc-devel] Question on updating FPC packages

Michael Van Canneyt michael at freepascal.org
Sun Oct 27 12:15:01 CET 2019



On Sun, 27 Oct 2019, J. Gareth Moreton wrote:

>
>> I was more referring to the use of correct types, use const when 
>> possible etc.
>> Change classes to advanced records where appropriate, that kind of thing.
>>
>> Michael.
>
> Which is why I hoped my patches for uComplex were permissible, since it 
> adds 'const' to make the compilation more efficient and sets the calling 
> convention to 'vectorcall' for Win64, something that the compiler won't 
> think to do unless explicitly told so, and maybe a slight incentive to 
> improve the compiler as far as vectorisation is concerned (and complex 
> numbers are a good candidate since for most basic operations, the 
> components are modified in tandem).

Well, I can't comment on this, in such matters I trust Florian knows what he is talking
about.

>
> I guess adding 'vectorcall' and 'const' are micro-optimisations, but I 
> see it more as refactoring and good coding practice in the case of 
> 'const', while 'vectorcall' is more about knowing what kind of data 
> you're dealing with.

I would not argue in the case of const and apply where appropriate, 
I don't know enough about vectorcall to comment.

Maybe the patch can be split into parts so const can already be applied.

It's not the first time we must advise to keep patches small and focused.

Although I am also often a sinner when it comes to mixing things in a
patch. When you're in the flow of things, that's the last thing on your mind :/

Michael.


More information about the fpc-devel mailing list