emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47251: closed ([core-updates] [patch] gnu: python: Enable optimizati


From: GNU bug Tracking System
Subject: bug#47251: closed ([core-updates] [patch] gnu: python: Enable optimizations.)
Date: Fri, 11 Jun 2021 01:04:01 +0000

Your message dated Fri, 11 Jun 2021 03:03:33 +0200
with message-id <20210611030333.72f69b00@tachikoma.lepiller.eu>
and subject line Re: bug#47251: [core-updates] [patch] gnu: python: Enable 
optimizations.
has caused the debbugs.gnu.org bug report #47251,
regarding [core-updates] [patch] gnu: python: Enable optimizations.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
47251: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=47251
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [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).

Attachment: 0002-gnu-python-Enable-optimizations.patch
Description: Text Data

Attachment: python-report
Description: Binary data


--- End Message ---
--- Begin Message --- Subject: Re: bug#47251: [core-updates] [patch] gnu: python: Enable optimizations. Date: Fri, 11 Jun 2021 03:03:33 +0200
Le Sun, 06 Jun 2021 14:34:31 +0200,
Ludovic Courtès <ludo@gnu.org> a écrit :

> 
> > +             "CFLAGS=-fno-semantic-interposition"
> >               (string-append "LDFLAGS=-Wl,-rpath="
> > -                            (assoc-ref %outputs "out") "/lib"))
> > +                            (assoc-ref %outputs "out") "/lib"
> > +                            " -fno-semantic-interposition"))  
> 
> Could you add a comment for ‘-fno-semantic-interposition’?  Also,
> please make sure that setting CFLAGS does not override useful
> defaults (for Autoconf-based build systems, CFLAGS defaults to ‘-O2
> -g’ and overriding it means you lost both -O2 and -g; if we lose
> ‘-g’, ‘--with-debug-info’ won’t have any effect).
> 

With the patch, python still builds with -g -O3.

Pushed as 99d450b085b7bf44d669093f6c9964391ce1b451 to
e4aa346d57f61956626032d0d1dfca6b3c96e06a to core-updates, thanks!


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]