about summary refs log tree commit diff
path: root/src/libexpr/eval.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-08-29T15·28+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-08-29T17·36+0200
commit26d92017d3b36cff940dcb7d1611c42232edb81a (patch)
tree856350170478111ea3a61b3b457e4fbee40826ce /src/libexpr/eval.hh
parentc0a7b84748d5e27e6804117b8a57ce71269c3c66 (diff)
Add builtin function "partition"
The implementation of "partition" in Nixpkgs is O(n^2) (because of the
use of ++), and for some reason was causing stack overflows in
multi-threaded evaluation (not sure why).

This reduces "nix-env -qa --drv-path" runtime by 0.197s and memory
usage by 298 MiB (in non-Boehm mode).
Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r--src/libexpr/eval.hh3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index 47e4d99bf6ed..6f1befa2a23e 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -71,7 +71,8 @@ public:
 
     const Symbol sWith, sOutPath, sDrvPath, sType, sMeta, sName, sValue,
         sSystem, sOverrides, sOutputs, sOutputName, sIgnoreNulls,
-        sFile, sLine, sColumn, sFunctor, sToString;
+        sFile, sLine, sColumn, sFunctor, sToString,
+        sRight, sWrong;
     Symbol sDerivationNix;
 
     /* If set, force copying files to the Nix store even if they