<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 1/14/22 03:18, Ben Grasset via
fpc-devel wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAL4d7FgD6eKBERJ90qKYSqh_UCACo0r28bbuutHytUqXha9GLw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">On Thu, Jan 13, 2022 at 11:28 AM Nikolay Nikolov
via fpc-devel <<a
href="mailto:fpc-devel@lists.freepascal.org" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">fpc-devel@lists.freepascal.org</a>>
wrote:<br>
</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_quote"> </div>
</div>
</blockquote>
<p>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.</p>
</div>
</blockquote>
<div> 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 <i>was </i>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).</div>
<div><br>
</div>
<div>64-bit:</div>
<div><br>
</div>
<div>PS D:\fpclaz\FPCSource\compiler> Measure-Command
{Start-Process make -ArgumentList "cycle
PP=D:\fpclaz\fpc\bin\x86_64-win64\ppcx64.exe" -Wait}<br>
<br>
Days : 0<br>
Hours : 0<br>
Minutes : 0<br>
Seconds : 52<br>
Milliseconds : 815<br>
Ticks : 528157597<br>
TotalDays : 0.000611293515046296<br>
TotalHours : 0.0146710443611111<br>
TotalMinutes : 0.880262661666667<br>
TotalSeconds : 52.8157597<br>
TotalMilliseconds : 52815.7597<br>
</div>
<div><br>
</div>
<div>32-bit:</div>
<div><br>
</div>
<div>PS D:\fpclaz\fpcsource\compiler> Measure-Command
{Start-Process make -ArgumentList "cycle
PP=D:\fpclaz\fpc\bin\x86_64-win64\ppc386.exe" -Wait}<br>
<br>
Days : 0<br>
Hours : 0<br>
Minutes : 0<br>
Seconds : 56<br>
Milliseconds : 873<br>
Ticks : 568733659<br>
TotalDays : 0.000658256549768519<br>
TotalHours : 0.0157981571944444<br>
TotalMinutes : 0.947889431666667<br>
TotalSeconds : 56.8733659<br>
TotalMilliseconds : 56873.3659<br>
</div>
</div>
</div>
</blockquote>
<p>Just for the record, is this with antivirus off or on and which
antivirus program?</p>
<p> 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:</p>
<p>1) CPU is usually not a huge bottleneck when compiling with FPC
under Windows</p>
<p>2) I/O is a huge bottleneck, even with large amounts of free RAM
available for cache<br>
</p>
<p>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.<br>
</p>
<p>4) The compilation speed of ppcx64 and ppcrossx64 is comparable
regardless of whether Windows Defender is on or off.</p>
<p>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.<br>
</p>
<p>Nikolay</p>
</body>
</html>