Afaik there is still a lack of certain optimizations. So using pointers can (read below) make a difference. And 5% can be a huge diff, as well as it can be a small diff.
Generally I do really discourage those optimizations. They can easily backfire by adding hard to find bugs, or preventing newer fpc from doing new optimizations (and then the pointers are slower)
Using pointers, is not always just about pointers, but also about the total of variables used in a procedure and in a loop.
And with that the amount of variables NOT stored in registers.
p1 := @A[0];
p2 := p1+High(A);
for i := High(A) div 2 downto 0 do
begin
Tmp := p1^;
Now the loop has 4 variables (i, p1, p2, tmp). "High(a)" is only needed before the loop starts, and "0" is a constant
for i := 0 to iMax div 2 do
begin
Tmp := A[i];
This loop only had 3 variables (i, A, tmp).
So worst case the pointer version does not have enough registers, and will be slower.
This can be improved (no need for i):
p1 := @A[0];
p2 := p1+High(A);
while p2 > p1 do
But it still needs 3 registers. Same as the none pointer.
----
I am not saying that it will gain anything in this particular case... Just pointing out that doing optimizations by hand is a tricky business.
And in the end, it had to be tested for each indented platform/cpu (even different cpu of the same class, eg older pentium vs newer pentium).... And with each new fpc version again.
----
In larger code, using pointers sometime can help bringing down the amount of required registers. And if you can the tune the code, so fpc actually uses registers for all variables in a loop, then it may help.
I used this (and more) long ago, with an older fpc version
https://bugs.freepascal.org/view.php?id=10275The speed diff was significant. The loss of read-ability for the code too.