On Sun, 27 Oct 2019, Florian Klämpfl wrote:

Am 27.10.19 um 10:27 schrieb Michael Van Canneyt:
If you genuinely believe that micro-optimization changes can make a difference:

Submit patches.

As said: I am against applying them. Why? They clutter code and after all, they make assumptions about the current target which not might be always valid. And time testing them is much better spent in improving the compiler and then all code benefits. Another point: for example explicit inline increases normally code size (not always but often), so it is against the use of -Os. Applying inline manually on umpteen subroutines makes no sense. Better improve auto inlining.

I am aware of your point of view, and I agree. Because, as I wrote:

As a rule, the programmer should not have to care about such things. The compiler must handle that. It knows better (well, it should :)).

Best of all would IMHO be to abolish or even totally ignore 'inline'. It is a hint, after all. The compiler is not forced to inline, even when the modifier is there.

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.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to