> On Feb 2, 2023, at 3:57 PM, Adriaan van Os via fpc-devel 
> <fpc-devel@lists.freepascal.org> wrote:
> 
> - under what circumstances (and in what compiler mode) does FPC pass large 
> (say 1 MB or 1 GB) "const" parameters by value (which is extremely 
> inefficient) ?
> - for what reasons ?
> 
> As long as these questions are not addressed and cleared and documented 
> "const" parameters are not a useable in actual code.

That’s what I want to know. There should be a hard rule like records over X 
bytes are passed by reference. In the issue you posted they said they had a 
massive performance penalty in their library because const was passing by value 
and this makes people like myself paranoid so I’m inclined to use constref 
everywhere with larger records.

Regards,
Ryan Joseph

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to