Why are precompiled versions faster than those built from source code?

asked 2017-07-24 18:07:48 +0100

anonymous user

Anonymous

updated 2017-07-24 21:40:13 +0100

vdelecroix gravatar image

Maybe I am missing an environment variable or make target but my builds are always slower.

For example

%time _ = bernoulli(3*10^5)

finishes in about 2 min. 30 sec. using a precompiled version but 31 min. 41 sec. built from source (7.6) and 47 min. from source (8.0) and

time a = N(pi, digits=5000000)

finishes in 13 min. 42 sec. from source (7.6) and 20 min. 21 sec. from source (8.0)

I use SAGE64=yes and SAGE_INSTALL_GCC=no Is it PARI/GP tuning or MPIR vs. GMP or some other thread related problem?

edit retag flag offensive close merge delete

Comments

Have you checked the build logs for errors and other anomalies?

grep -ls "^Error" logs/pkgs/*

Richard_L gravatar imageRichard_L ( 2017-07-24 22:05:20 +0100 )edit

For what it's worth, runtimes on my laptop (Core i5-6300U, 2.4 GHz) are:

sage: version()
'SageMath version 7.6, Release Date: 2017-03-25'
sage: %time
sage: b=bernoulli(3*10^5)
CPU time: 41.59 s,  Wall time: 41.60 s
sage: %time
sage: a = N(pi, digits=5000000)
CPU time: 20.41 s,  Wall time: 20.42 s

and

sage: version()
'SageMath version 8.0, Release Date: 2017-07-21'
sage: %time
sage: b=bernoulli(3*10^5)
CPU time: 21.14 s,  Wall time: 21.15 s
sage: %time
sage: a = N(pi, digits=5000000)
CPU time: 10.84 s,  Wall time: 10.85 s

Both versions were built from source using gcc 5.3.1.

Richard_L gravatar imageRichard_L ( 2017-07-25 20:22:31 +0100 )edit