Discussion:
[fpc-pascal] Will moving from due core CPU to 6 Core CPU of the same clock speed improve the speed of FPC compiling?
Dennis
2018-08-06 09:27:35 UTC
Permalink
I have been using Intel i3 Dual Core CPU @3.4 GHz for a few years.
If I upgrade my computer and CPU to Intel Core i5 6-core @3.6GHz,
will the speed of FPC compilation improve noticeably?

Since FPC seems to be single threaded, I wonder whether 0.2GHz increase
in clock speed will make any noticeable improvement in speed.

Dennis
_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepasc
el_es
2018-08-06 12:09:16 UTC
Permalink
On 06/08/18 10:27, Dennis wrote:
> I have been using Intel i3 Dual Core CPU @3.4 GHz for a few years. If
> I upgrade my computer and CPU to Intel Core i5 6-core @3.6GHz, will
> the speed of FPC compilation improve noticeably?
>
> Since FPC seems to be single threaded, I wonder whether 0.2GHz
> increase in clock speed will make any noticeable improvement in
> speed.
>
> Dennis

I'm not sure if you can boil everything into 'just 200 MHz more' TBH.
(Oh where are the days when 200MHz was all we ever had... gone, with t3h wind(ows).)

Newer processors tend to, besides higher clock and cores/dies, possess
more cache (L1, L2, L3) so, more, and faster, memory, closer to the processor.
Also improvements in the processing pipeline/branch prediction, RAM bus throughput
(memory clocking x width) etc. All that matters and improves (if you can find this data
for your old machine, compare it with the new one) regularly.

If there is a 'single threaded, memory intensive' benchmark you can compare on both machines,
there is a good chance, that compilation MAY improve that much.
It's not scientific, as benchmarks can not compare (or rarely can compare) to the real load,
only for comparing benchmark-to-benchmark.

Hope this helps

-L.

_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.o
Martin
2018-08-06 12:56:09 UTC
Permalink
On 06/08/2018 14:09, el_es wrote:
>
> If there is a 'single threaded, memory intensive' benchmark you can compare on both machines,
> there is a good chance, that compilation MAY improve that much.
> It's not scientific, as benchmarks can not compare (or rarely can compare) to the real load,
> only for comparing benchmark-to-benchmark.
>
You can get benchmark data from
http://cpu.userbenchmark.com/Compare/Intel-Core-i5-8600K-vs-Intel-Core-i3-3240/3941vsm2133
There are single core comparisons on the page.
_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists
el_es
2018-08-06 15:14:51 UTC
Permalink
On 06/08/18 13:56, Martin wrote:
> On 06/08/2018 14:09, el_es wrote:
>>
>> If there is a 'single threaded, memory intensive' benchmark you can compare on both machines,
>> there is a good chance, that compilation MAY improve that much.
>> It's not scientific, as benchmarks can not compare (or rarely can compare) to the real load,
>> only for comparing benchmark-to-benchmark.
>>
> You can get benchmark data from http://cpu.userbenchmark.com/Compare/Intel-Core-i5-8600K-vs-Intel-Core-i3-3240/3941vsm2133
> There are single core comparisons on the page.

Thank you, TIL (Today I Learned ;) ) of the userbenchmark site :)

-L.

_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://li
Martin
2018-08-06 12:38:08 UTC
Permalink
On 06/08/2018 11:27, Dennis wrote:
> I have been using Intel i3 Dual Core CPU @3.4 GHz for a few years.
> If I upgrade my computer and CPU to Intel Core i5 6-core @3.6GHz,
> will the speed of FPC compilation improve noticeably?
>
> Since FPC seems to be single threaded, I wonder whether 0.2GHz
> increase in clock speed will make any noticeable improvement in speed.
Assuming you only change the CPU, and nothing else...

Depends what you compile. And how.

For example the Lazarus IDE, can (in some cases) start more than one fpc
in parallel. The best example is if you build the IDE itself (clean build).
The IDE detects packages that do not depend on each other, and process
them in parallel.

So to benefit, you need to compile a project + packages, AND the
packages must:
- need recompilation
- be structured, so they do not have a single dependency line.
The project itself will not benefit. Only (some) packages.

Compilation also depends on other hardware.
On your current setup, watch the CPU usage during compilation, is it
100% (on one core) all the time?
IF it is not, your CPU already waits on other resources. Then the 200
MHZ may not give you much.

Despite that do the math. It's approx 5% diff. So on 60 seconds compile
time you could in theory save a bit over 3 seconds. (But you will
probably get less)


A fast harddisk/ssd is another speed factor.
RAM will also help. The linker may use lots of it if you use smart
linking. But even for compilation: Most OS will use free RAM to cache
files. So if the ppu you just compiled, and need for the next unit, is
still cached, then that will help a lot. (Though I have no indication at
which RAM size you get how big a benefit)

Also watch how much free RAM you have during compilation.
_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.
Martin
2018-08-06 15:04:47 UTC
Permalink
On 06/08/2018 16:55, Dennis Poon wrote:
> The existing i3 uses DDR3 RAM and Core i5 will come with DDR4 RAM.
Well check on userbenchmark what difference you can expect for a single
core benchmark. You can select the exact 2 cpu you are interested in.

That should give you are good indication.

> When I compile my project, there is only 1 copy of ppcx64 running
> (with 1 thread) using all of 1 logical core. i.e. 25% CPU load on the
> 4 logical cores (2 physical core) CPU.
Yes, that will be the case, unless you have lots of independent packages.
_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org
Martin
2018-08-06 16:11:40 UTC
Permalink
On 06/08/2018 17:19, Dennis Poon wrote:
> Martin wrote:
>> On 06/08/2018 16:55, Dennis Poon wrote:
>>> The existing i3 uses DDR3 RAM and Core i5 will come with DDR4 RAM.
>> Well check on userbenchmark what difference you can expect for a
>> single core benchmark. You can select the exact 2 cpu you are
>> interested in.
>>
>> That should give you are good indication.
>>
> Thanks a lot.
> There is the exact comparison
> http://cpu.userbenchmark.com/Compare/Intel-Core-i5-8600K-vs-Intel-Core-i3-4130/3941vs1621
>
>
>
> Should I look at the yellow region?  it says average single core speed
> is above 47% faster.
Yes, that line is single core benchmark

From the help:
> Single core mixed speed is an important CPU test for consumers. It
> measures the ability of a processor to perform both integer and
> floating point operations at the same time. This test only stresses
> one processing core at a time

FPC uses more parts of the cpu than the benchmark.
So the value is indicative.

So you *might* get 47%. It could even be a bit less than this. (to be on
the save side, I would expect less)

Out of interest, how long does it take you to compile your project?

To give you are comparison, on an i7-8700k, ssd, plenty of RAM, to
rebuild (clean) the IDE 1.8.4 / 64 bit / win 10
without debug info, with -O2 takes 35 secs
with debug info -gw, no opt takes 55 secs

- this includes cleaning old files, with takes a few seconds in itself
- about half is building packages. (during this time, usually several
threads are active.)
- only for 4 to 5 secs (of the 55 secs) all cores are fully used. (so
the 8600k should be close to the speed I got)

You can check how long this takes on your current system.

-----------------
If you are compiling in the Lazarus IDE, there are a few things you can do.

I assume your project is rather big (otherwise compile time should not
really be the issue).

You can move units to packages. They may not have to be compiled each
time, and if you move really lots to packages then they may be compiled
in parallel (though the main project probably will still have the
biggest chunk).

Another factor in this is, that compiling with debug info is slower.
Using packages, you may compile some of them without debug info.

And lastly, it is not just compiling.
Starting the debugger takes some time too.
2 ways to deal with this:
- get the latest gdb. This may save a few percent.
- in Lazarus trunk, use fpdebug (package LazDebuggerFp). This is a good
bit faster.
Dennis Poon
2018-08-07 07:42:43 UTC
Permalink
Martin wrote:
>
> Out of interest, how long does it take you to compile your project?
>
Only 20 seconds. But sometimes, when I modify some units used by other
units which are in turn used by other units, FPC throws the following
exception when I compile (not build)
uspdata.pas(228,50) Error: Compilation raised exception internally

When that happens, I have to build the entire project, and that takes
much longer.

Dennis
_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/
Christo Crause
2018-08-08 10:23:41 UTC
Permalink
On Tue, Aug 7, 2018 at 9:42 AM, Dennis Poon <***@avidsoft.com.hk> wrote:

> Only 20 seconds. But sometimes, when I modify some units used by other
> units which are in turn used by other units, FPC throws the following
> exception when I compile (not build)
> uspdata.pas(228,50) Error: Compilation raised exception internally
>
> When that happens, I have to build the entire project, and that takes much
> longer.
>

Are you perhaps using generics somewhere in your project? If so your
compiler crash may be similar to bugs 0033593, 0034024 and possibly 0034065.
Christo
2018-08-08 16:53:14 UTC
Permalink
On Wed, 2018-08-08 at 19:24 +0800, Dennis wrote:
>
> Christo Crause wrote:
> >
> > On Tue, Aug 7, 2018 at 9:42 AM, Dennis Poon <***@avidsoft.com.hk> wrote:
> > > Only 20 seconds. But sometimes, when I modify some units used by other units which are in
> > > turn used by other units, FPC throws the following exception when I compile (not build)
> > > uspdata.pas(228,50) Error: Compilation raised exception internally
> > >
> > > When that happens, I have to build the entire project, and that takes much longer.
> > >
> > Are you perhaps using generics somewhere in your project? If so your compiler crash may be
> > similar to bugs 0033593, 0034024 and possibly 0034065.
> >
>  Yes, I use quite a lot of generics of Generics.Collection   TList<T> and TDictionary<T> etc.
> Are these bugs fixed in the trunk version?
All three bug reports are still open, so not fixed yet.  If you can reduce the problem to a
small project with dummy code it may help to to file another bug report to highlight this
problem in the compiler. 
geneb
2018-08-06 16:27:58 UTC
Permalink
One of the most "bang for your buck" methods of improving compling speed
would be to go to an SSD from a regular hard disk. A 240GB SSD can be had
for less than $60 USD these days.


g.
--
Proud owner of F-15C 80-0007
http://www.f15sim.com - The only one of its kind.
http://www.diy-cockpits.org/coll - Go Collimated or Go Home.
Some people collect things for a hobby. Geeks collect hobbies.

ScarletDME - The red hot Data Management Environment
A Multi-Value database for the masses, not the classes.
http://scarlet.deltasoft.com - Get it _today_!
_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.o
Jim Lee
2018-08-06 18:05:58 UTC
Permalink
On 08/06/2018 09:27 AM, geneb wrote:
>
> One of the most "bang for your buck" methods of improving compling
> speed would be to go to an SSD from a regular hard disk.  A 240GB SSD
> can be had for less than $60 USD these days.
>
>
> g.

I've gone through 5 SSDs in as many years - they don't last.  And, these
were not cheap ones - they cost me ~$600 USD each for 1TB. I've gone
back to rotating magnetic media as I've only lost 2 of those in 35 years...

-Jim

_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/
geneb
2018-08-06 19:35:29 UTC
Permalink
On Mon, 6 Aug 2018, Jim Lee wrote:

> On 08/06/2018 09:27 AM, geneb wrote:
>>
>> One of the most "bang for your buck" methods of improving compling
>> speed would be to go to an SSD from a regular hard disk.  A 240GB SSD
>> can be had for less than $60 USD these days.
>>
>>
>> g.
>
> I've gone through 5 SSDs in as many years - they don't last.  And, these
> were not cheap ones - they cost me ~$600 USD each for 1TB. I've gone
> back to rotating magnetic media as I've only lost 2 of those in 35 years...
>
I have no idea what you're doing to those poor drives then. :) My main
machine has been booting from a 500GB SSD without issue for the last ~4
years. I've got other drives of smaller sizes in service for longer, also
without issue. I use either Windows 7 or Windows 10 Ent. on those.

I've got 1TB Samsung T3 (external USB3, 1TB) that I've been running for
the last ~2+ years without fail and it hosts VMWare Workstation images
that I use on a daily basis for software development.

g.


--
Proud owner of F-15C 80-0007
http://www.f15sim.com - The only one of its kind.
http://www.diy-cockpits.org/coll - Go Collimated or Go Home.
Some people collect things for a hobby. Geeks collect hobbies.

ScarletDME - The red hot Data Management Environment
A Multi-Value database for the masses, not the classes.
http://scarlet.deltasoft.com - Get it _today_!
Jim Lee
2018-08-06 18:06:13 UTC
Permalink
On 08/06/2018 09:27 AM, geneb wrote:
>
> One of the most "bang for your buck" methods of improving compling
> speed would be to go to an SSD from a regular hard disk.  A 240GB SSD
> can be had for less than $60 USD these days.
>
>
> g.

I've gone through 5 SSDs in as many years - they don't last.  And, these
were not cheap ones - they cost me ~$600 USD each for 1TB. I've gone
back to rotating magnetic media as I've only lost 2 of those in 35 years...

-Jim

_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/
Vojtěch Čihák
2018-08-06 13:11:31 UTC
Permalink
And the gain will be lost after installing Spectre patches, where is measured performance loss is 1~3%.
 
V.
______________________________________________________________
> Od: Martin <***@mfriebe.de>
> Komu: fpc-***@lists.freepascal.org
> Datum: 06.08.2018 14:38
> Předmět: Re: [fpc-pascal] Will moving from due core CPU to 6 Core CPU of the
>
On 06/08/2018 11:27, Dennis wrote:
> I have been using Intel i3 Dual Core CPU @3.4 GHz for a few years.
> If I upgrade my computer and CPU to Intel Core i5 6-core @3.6GHz,
> will the speed of FPC compilation improve noticeably?
>
> Since FPC seems to be single threaded, I wonder whether 0.2GHz
> increase in clock speed will make any noticeable improvement in speed.
Assuming you only change the CPU, and nothing else...

Despite that do the math. It's approx 5% diff. So on 60 seconds compile
time you could in theory save a bit over 3 seconds. (But you will
probably get less)
_______________________________________________
fpc-pascal maillist  -  fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal <http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal>
Juha Manninen
2018-10-16 19:07:37 UTC
Permalink
Computers have been fast enough for many years already, except for the
latest 3-D games and some special tasks maybe.
I have used an AsRock BeeBox TV-box with a passively cooled Celeron
N3000 mobile CPU for few years now as my main computer. It still feels
fast! I bet the dual port RAM and SSDs help with that, although the
CPU is slow in today's standards.
Only Windows 10 running under VirtualBox is slow but I don't need to
start it often.

The new models of Celeron mobile CPUs are already much faster and
there are similar gadgets using them. Highly recommended!

Juha
_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pasca
Loading...