[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#47251] [core-updates] [patch] gnu: python: Enable optimizations.
From: |
Julien Lepiller |
Subject: |
[bug#47251] [core-updates] [patch] gnu: python: Enable optimizations. |
Date: |
Fri, 19 Mar 2021 00:16:22 +0100 |
Hi Guix!
This is the second patch I created in my exploration of our Python
package. Here, I noticed that our Python was very slow compared to
other distros and I tried to find which options they used. I found some
hints from Fedora. In this patch, I enable a few options and add a C/LD
flag to make python run faster.
I also attached a report of timing running the benchmark from
pyperformance on my Fedora machine. For comparison, I have also added
the results for Fedora's python3, which is somewhere in between.
I noticed that this increases the size of the python package by 20MB,
which is due entirely to --with-lto option, which also accounts for
half of the speedup. Overall, this python is almost twice as fast on
some benchmarks, and always faster on all of them. It's about 1.5 times
faster on average.
Strangely, the python package from Alpine is twice as small as this
package, and they use the --with-lto option. I wonder how they achieve
that.
Note that I modified python-2, as its flags are inherited by python-3
(and also the bootstrap python from commencement.scm).
0002-gnu-python-Enable-optimizations.patch
Description: Text Data
python-report
Description: Binary data
- [bug#47251] [core-updates] [patch] gnu: python: Enable optimizations.,
Julien Lepiller <=