Optimize empty sets
This reduces the number of Bindings allocations by about 10%.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user