aboutsummaryrefslogtreecommitdiff
path: root/src/nix-build
diff options
context:
space:
mode:
authorpennae <github@quasiparticle.net>2021-12-25 15:29:49 +0100
committerpennae <github@quasiparticle.net>2022-01-03 21:05:53 +0100
commit00c993f48b1c752656d8cdd2c25e38f9ba572128 (patch)
tree91c8a705567b281cdfe3c21c3bcb21c8842565c0 /src/nix-build
parent96d08fcd66e2c38598bab4f39a37a98d58347467 (diff)
add zipAttrsWith primop
nixpkgs can save a good bit of eval memory with this primop. zipAttrsWith is used quite a bit around nixpkgs (eg in the form of recursiveUpdate), but the most costly application for this primop is in the module system. it improves the implementation of zipAttrsWith from nixpkgs by not checking an attribute multiple times if it occurs more than once in the input list, allocates less values and set elements, and just avoids many a temporary object in general. nixpkgs has a more generic version of this operation, zipAttrsWithNames, but this version is only used once so isn't suitable for being the base of a new primop. if it were to be used more we should add a second primop instead.
Diffstat (limited to 'src/nix-build')
0 files changed, 0 insertions, 0 deletions