summaryrefslogtreecommitdiff
path: root/guix/utils.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-02-19 10:18:48 +0100
committerLudovic Courtès <ludo@gnu.org>2021-02-23 15:24:49 +0100
commitc8bd5fa59c4493734fa41f6c4d5b972ba8b5b141 (patch)
treeaaafa3e75f1af054b8428646ef57d574942bcf1e /guix/utils.scm
parentb57de6fea126f907a873ae14ad8b32dc32456e8e (diff)
gexp: Reduce allocations while traversing lists.
This reduces the total amount of memory allocated by 8% when running "guix build qemu -d --no-grafts". * guix/gexp.scm (fold/tree): New procedure. (gexp-inputs)[interesting?]: New procedure. [add-reference-inputs]: Change (lst ...) clause to (? pair? lst), and use 'fold/tree' to recurse into it. (gexp-inputs)[add-reference-output]: Likewise, and remove plain (lst ...) clause. Call 'fold'. (gexp->sexp)[reference->sexp]: In the list case, avoid boxing and recursive call when the object has a plain non-aggregate type.
Diffstat (limited to 'guix/utils.scm')
0 files changed, 0 insertions, 0 deletions