mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-18 20:57:12 -05:00
gnu: python: Enable optimizations.
As a result, python execution time of scripts is decreased by 6 to 40%. gnu/packages/python (python-2.7)[arguments]: Add configure and make flags to optimize the resulting python.
This commit is contained in:
parent
20d52562e5
commit
99d450b085
1 changed files with 9 additions and 1 deletions
|
@ -184,7 +184,10 @@ (define-public python-2.7
|
|||
"--with-system-expat" ;for XML support
|
||||
"--with-system-ffi" ;build ctypes
|
||||
"--with-ensurepip=install" ;install pip and setuptools
|
||||
"--with-computed-gotos" ;main interpreter loop optimization
|
||||
"--with-lto" ;increase size by 20MB, but 15% speedup
|
||||
"--enable-unicode=ucs4"
|
||||
"--enable-optimizations"
|
||||
|
||||
;; Prevent the installed _sysconfigdata.py from retaining a reference
|
||||
;; to coreutils.
|
||||
|
@ -198,8 +201,13 @@ (define-public python-2.7
|
|||
"ac_cv_file__dev_ptmx=no"
|
||||
"ac_cv_file__dev_ptc=no")
|
||||
'())
|
||||
;; -fno-semantic-interposition reinstates some optimizations by gcc
|
||||
;; leading to around 15% speedup. This is the default starting from
|
||||
;; python 3.10.
|
||||
"CFLAGS=-fno-semantic-interposition"
|
||||
(string-append "LDFLAGS=-Wl,-rpath="
|
||||
(assoc-ref %outputs "out") "/lib"))
|
||||
(assoc-ref %outputs "out") "/lib"
|
||||
" -fno-semantic-interposition"))
|
||||
;; With no -j argument tests use all available cpus, so provide one.
|
||||
#:make-flags
|
||||
(list (string-append
|
||||
|
|
Loading…
Reference in a new issue