diff options
author | Ludovic Courtès <ludo@gnu.org> | 2021-10-26 10:46:12 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-10-26 12:46:27 +0200 |
commit | b7b0ac85443c719a616edee6963578e58396f339 (patch) | |
tree | d4a75f94d1c573989618f2a43872ccc6df747779 /guix/profiling.scm | |
parent | b7a36599b4533db35e27e0fc5506589fb7c8221f (diff) | |
download | guix-patches-b7b0ac85443c719a616edee6963578e58396f339.tar guix-patches-b7b0ac85443c719a616edee6963578e58396f339.tar.gz |
packages: Optimize 'package-transitive-supported-systems'.
With this change, the wall-clock time of:
./pre-inst-env guile -c '(use-modules (gnu) (guix)(ice-9 time)) (time (pk (fold-packages (lambda (p r)(supported-package? p)(+ 1 r)) 0)))'
goes from 3.2s to 2.0s, a 37% improvement.
* guix/packages.scm (package-transitive-supported-systems): Change
'supported-systems' to 'supported-systems-procedure', returning an
'mlambdaq' instead of the original 'mlambda'. Add 'procs'. Adjust body
accordingly.
Diffstat (limited to 'guix/profiling.scm')
0 files changed, 0 insertions, 0 deletions