aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/src
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 /doc/manual/src
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 'doc/manual/src')
-rw-r--r--doc/manual/src/release-notes/rl-next.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/manual/src/release-notes/rl-next.md b/doc/manual/src/release-notes/rl-next.md
index 2a67a39b1..a516887b1 100644
--- a/doc/manual/src/release-notes/rl-next.md
+++ b/doc/manual/src/release-notes/rl-next.md
@@ -4,3 +4,5 @@
more compliant one](https://github.com/ToruNiina/toml11).
* Added `:st`/`:show-trace` commands to nix repl, which are used to
set or toggle display of error traces.
+* New builtin function `builtins.zipAttrsWith` with same functionality
+ as `lib.zipAttrsWith` from nixpkgs, but much more efficient.