On 1/14/22 03:18, Ben Grasset via fpc-devel wrote:
On Thu, Jan 13, 2022 at 11:28 AM Nikolay Nikolov via fpc-devel
<fpc-devel@lists.freepascal.org> wrote:
So, instead of giving actual benchmark data on the Windows
performance, you speculate by claiming that having faster
exception handling matters, and then you immediately debunk your
own argument by admitting it probably doesn't matter for the
compilation speed.
I went ahead and tested "make cycle" for both ppcx64.exe and
ppc386.exe, using PowerShell's "Measure Command" for timing as it's
the most accurate method I'm aware of on Windows. Both results came in
under one minute, and the 64-bit compiler /was /faster, though not by
a large amount for that relatively short workload (I might test a full
repo build later to see what the differences are like between longer
compilations). This also would seem to show that what CPU you have
basically stops mattering after a certain point as far as FPC's
performance goes, as mine is MUCH slower than yours (i7-4790K clocked
at 4.6GHz currently).
64-bit:
PS D:\fpclaz\FPCSource\compiler> Measure-Command {Start-Process make
-ArgumentList "cycle PP=D:\fpclaz\fpc\bin\x86_64-win64\ppcx64.exe" -Wait}
Days : 0
Hours : 0
Minutes : 0
Seconds : 52
Milliseconds : 815
Ticks : 528157597
TotalDays : 0.000611293515046296
TotalHours : 0.0146710443611111
TotalMinutes : 0.880262661666667
TotalSeconds : 52.8157597
TotalMilliseconds : 52815.7597
32-bit:
PS D:\fpclaz\fpcsource\compiler> Measure-Command {Start-Process make
-ArgumentList "cycle PP=D:\fpclaz\fpc\bin\x86_64-win64\ppc386.exe" -Wait}
Days : 0
Hours : 0
Minutes : 0
Seconds : 56
Milliseconds : 873
Ticks : 568733659
TotalDays : 0.000658256549768519
TotalHours : 0.0157981571944444
TotalMinutes : 0.947889431666667
TotalSeconds : 56.8733659
TotalMilliseconds : 56873.3659
Just for the record, is this with antivirus off or on and which
antivirus program?
Also, I know my first benchmark was make cycle comparison between ppc386
and ppcx64 under linux (and it showcased that 32-bit compilers can be
much faster, when CPU is the bottleneck), but then I realized it can be
an apples to oranges comparison, because ppc386 contains a very
different code generator, it emits 32-bit code, instead of 64-bit code.
That's why I tried compiling lazarus for win64 using ppcx64 and
ppcrossx64. On my computer it turned out that ppcrossx64 was slightly
faster, when antivirus is turned off. When antivirus is on, both became
slower, with sometimes ppcrossx64 was slightly slower, but other times
ppcx64 was still slower. It was less predictable with more random
variance in performance, but it felt like ppcrossx64 was slightly slower
on average with antivirus on. Another issue is that I/O turned out to be
a huge bottleneck, even with enormous amounts of RAM for cache. For
example, cleaning up the git repo between runs sends the deleted files
to the recycle bin. I then emptied the recycle bin, before running the
next build. However, skipping this recycle bin emptying resulted in a
performance boost that was larger than the difference between ppcrossx64
and ppcx64. So far, my preliminary conclusions are:
1) CPU is usually not a huge bottleneck when compiling with FPC under
Windows
2) I/O is a huge bottleneck, even with large amounts of free RAM
available for cache
3) Windows Defender is also a huge bottleneck and it appears to hurt
startup of 32-bit programs more (perhaps there are more win32 viruses to
scan for in exe files?). But it still hurts both win32 and win64
programs. Turning it off during long compilations is almost always
beneficial.
4) The compilation speed of ppcx64 and ppcrossx64 is comparable
regardless of whether Windows Defender is on or off.
5) When CPU is the bottleneck (antivirus turned off), the 32-bit hosted
compiler is faster. This still needs confirmation, though, because your
results show 32-bit being slower, but you didn't say whether antivirus
was off.
Nikolay
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel