mirror of
https://github.com/NixOS/nix
synced 2025-06-26 07:31:15 +02:00
Optimize empty sets
This reduces the number of Bindings allocations by about 10%.
This commit is contained in:
parent
16c9935fa9
commit
c8bb2371eb
3 changed files with 14 additions and 4 deletions
|
@ -281,6 +281,10 @@ EvalState::EvalState(const Strings & _searchPath)
|
|||
for (auto & i : paths) addToSearchPath(i);
|
||||
addToSearchPath("nix=" + settings.nixDataDir + "/nix/corepkgs");
|
||||
|
||||
clearValue(vEmptySet);
|
||||
vEmptySet.type = tAttrs;
|
||||
vEmptySet.attrs = allocBindings(0);
|
||||
|
||||
createBaseEnv();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue