Ludovic Courtès 78daf9e02e
derivations: Make 'coalesce-duplicate-inputs' linear in the number of inputs.
Partly fixes <https://issues.guix.gnu.org/49439>.
Reported by Ricardo Wurmus <rekado@elephly.net>.

When running the command:

  guix environment pigx-scrnaseq --search-paths --no-grafts

this change reduces total heap allocations from 1.4GiB to 717MiB (49%)
and wall-clock time from 7.5s to 5.7s (24%).

Without '--no-grafts', heap allocations go from 2.1GiB to 1.4GiB (33%)
and wall-clock time from 12.1s to 10.9s (10%).

* guix/derivations.scm (coalesce-duplicate-inputs): Rewrite using a hash
table to make it O(N) rather than O(N²).
2021-07-27 18:26:08 +02:00
..
2021-03-06 11:41:48 +01:00
2019-12-15 00:34:05 +01:00
2021-07-16 19:48:24 +02:00
2020-07-05 03:15:08 +05:30
2021-07-04 04:35:35 +02:00
2021-01-04 23:54:16 +01:00
2020-07-05 16:07:59 +05:30
2020-12-09 22:25:17 +01:00
2020-04-17 23:36:47 +02:00
2021-01-04 23:54:16 +01:00
2021-01-04 23:54:16 +01:00
2021-04-12 18:42:22 +02:00
2021-06-24 23:43:05 +02:00
2020-12-19 23:25:01 +01:00
2018-09-04 17:25:11 +02:00
2021-05-11 12:49:53 +02:00
2021-06-14 18:35:18 +02:00