Sergei Zimmerman b36f8043d2 libexpr: Speed up BindingsBuilder::finishSizeIfNecessary
Instead of iterating over the newly built bindings we can
do a cheaper set_intersection to count duplicates or fall back
to a per-element binary search over the "base" bindings.

This speeds up `hello` evaluation by around 10ms (0.196s -> 0.187s) and
`nixos.closures.ec2.x86_64-linux` by 140ms (2.744s -> 2.609s).

This addresses a somewhat steep performance regression from 82315c3807
that reduced memory requirements of attribute set merges. With this patch
we get back around to 2.31 level of eval performance while keeping the memory
usage optimization.

Also document the optimization a bit more.

(cherry picked from commit ec2fd2dc23)
2025-10-27 14:40:17 +00:00
2025-10-06 16:11:15 +02:00
2025-09-26 08:41:30 -07:00
2024-02-01 01:01:39 +01:00
2025-05-31 07:41:27 -07:00
2025-08-25 10:28:47 +02:00
2025-10-14 11:26:39 +02:00
2025-01-24 17:04:02 +01:00
2025-08-27 02:23:05 +03:00
2025-10-07 13:30:16 +02:00
2024-10-14 11:21:24 -04:00
2025-06-11 22:08:03 +00:00
2025-07-29 16:51:55 +02:00
2022-01-24 13:28:21 +01:00

Nix

Open Collective supporters CI

Nix is a powerful package manager for Linux and other Unix systems that makes package management reliable and reproducible. Please refer to the Nix manual for more details.

Installation and first steps

Visit nix.dev for installation instructions and beginner tutorials.

Full reference documentation can be found in the Nix manual.

Building and developing

Follow instructions in the Nix reference manual to set up a development environment and build Nix from source.

Contributing

Check the contributing guide if you want to get involved with developing Nix.

Additional resources

Nix was created by Eelco Dolstra and developed as the subject of his PhD thesis The Purely Functional Software Deployment Model, published 2006. Today, a world-wide developer community contributes to Nix and the ecosystem that has grown around it.

License

Nix is released under the LGPL v2.1.

S
Description
Nix, the purely functional package manager
Readme Cite this repository
163 MiB
0 Stars 3 Watchers 0 Forks
Languages
C++ 78.1%
Shell 9.7%
Nix 7.5%
Meson 1.8%
C 1.3%
Other 1.6%