So I have this simple code with 3 tests
1.
******
for x := 0 to StrToInt(edit1.Text) do begin
s := IntToStr(x);
end;
******
2.
******
lMax := StrToInt(edit1.Text);
for x := 0 to lMax do begin
s := IntToStr(x);
end;
******
3.
******
lMax := StrToInt(edit1.Text);
repeat
Inc(x)
until x = lMax;
******
Then I record time taken using GetTickCount.
I compiled with D7, XE2, XE7 and (FPC 2.6.4, Laz 1.4.2 - Fedora 22). The times for the EXE's under Win10 and Wine on Fedora 22 were negligible. The FPC was run native on Fedora.
In the order (D7, XE2, XE7, FPC + Laz) in seconds.
1) 10 000 000 loops
1.161, 0.287, 0.298, 1.424
2) 10 000 000 loops
1.464, 0.326, 0.315, 1.449
3) 1 000 000 000 loops
0.54, 0.539, 0.541, 1.865
Then I increased the loops for code 1, 2 by one "0"
1) 100 000 000 loops
16.4, 2.81, 2.873, 15.007
The importance here is at the basic variable level ie string and integers. FPC appears to be significantly slower. When dealing with larger datasets and database access ie we have to convert EACH DB datatype to display in a grid or export as CSV, XML etc. as well as basic integer FOR and REPEAT loops. If the basic "low" level variables are upto 5x slower the resulting complex app should be too. Keep in mind a table might not have 100 000 000 records but you could deal with that amount of strings, when your tables have quite a few fields etc. and longer strings not just couple chars.
As you can see it appears as if D7 and FPC are similar in string handling but with straight integer loops D7 - > XE7 are almost 3x faster and XE2+ almost 5x faster with string conversion.
I can post the whole code if need be and DFM etc.
Anyways I'd appreciate some feedback / comments.
Specs are i7, 16GB 2000Mhz. Fedora 22 64bit OS. Windows 7/10 and Wine.