[fpc-devel] Question on updating FPC packages

J. Gareth Moreton gareth at moreton-family.com
Sun Oct 27 12:20:32 CET 2019

Originally my patch just added the "vectorcall" calling convention to 
the functions; the "const" modifier was suggested by a third party and 
seemed sensible enough.  I weighed up the fact that it wouldn't change 
how to you call the function in Pascal code and accepted it.  The patch 
should be easily enough to split though, especially as the vectorcall 
thing is now just "{$calling vectorcall}" at the top of the file.

Gareth aka. Kit

On 27/10/2019 11:15, Michael Van Canneyt wrote:
> 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.
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

This email has been checked for viruses by Avast antivirus software.

More information about the fpc-devel mailing list