On Fri, 06 Mar 2020 08:11:11 +0000, The Natural Philosopher wrote:
> I've done some pi compiling.
>
> I protoed the code on my twin core X86 desktop, then transferred it to
> the pi and compiled it. Now my desktop aint brutal - its an entry level
> motherboard with a twin core entry level processor, and the compilations
> was dine across the 100Mbps network as far as file reading and writing
> went - but the pi zero took about ten times as long to compile on the SD
> card...
Same here: I've just compiled the same C code on the Lenovo T440 I'm
writing this on and on my Pi, one of the early 512MB model Bs. Both hosts
are running the latest code versions as of last week: the T440 runs
Fedora 31 and the Pi runs Buster.
The code is a set of related C programs: 15 source files, 11 header
files, a total of 9213 lines including comments etc. or 251Kb of text.
Output from the compilation is a small code library and four executables.
All runs were preceded with an untimed 'make clean' run to make all timed
compilations comparable. The compilations are run with make. Some of the
modules are built into into a library with 'ar', and finally the four
executables are linked.
Timings:
System First compile Second compile
Lenovo T440 (8GB RAM, i5, 1.9GHz) 3.86 secs 0.74 secs
RPi 512MB B 23.27 secs 23.50 secs
This makes the Pi 6 times slower than the T440 on the first compilation
and 32 times slower on the second.
The main difference for the first and second successive compilations is
because the T440 has enough RAM to cache all the source files and
compiler executables, so very little, if anything, needed to be reloaded
for the second run while the Pi had to read in everything during both
runs.
It would be interesting to see a similar comparison run using Pi models
2B, 3B and 4 with, ideally, 1GB and 4GB RAM.
--
Martin | martin at
Gregorie | gregorie dot org
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|