summary refs log tree commit diff
path: root/src/libexpr/eval.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-04-15 00:37:36 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-04-15 00:37:36 +0000
commit04c4bd3624b094043ff0f2410c1e376a51f457f7 (patch)
tree0ff3c39628ceeb26af33f2b461d84a13db9aa561 /src/libexpr/eval.hh
parente41b5828db0c154e4a3f0ed6299a987fde5bc03f (diff)
downloadguix-04c4bd3624b094043ff0f2410c1e376a51f457f7.tar.gz
* Store lists as lists of pointers to values rather than as lists of
  values.  This improves sharing and gives another speed up.
  Evaluation of the NixOS system attribute is now almost 7 times
  faster than the old evaluator.

Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r--src/libexpr/eval.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index 313a1d9b8e..7252cae4b5 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -76,7 +76,7 @@ struct Value
         Bindings * attrs;
         struct {
             unsigned int length;
-            Value * elems;
+            Value * * elems;
         } list;
         struct {
             Env * env;
@@ -282,8 +282,8 @@ private:
     
     unsigned long nrEnvs;
     unsigned long nrValuesInEnvs;
-    unsigned long nrValuesInLists;
     unsigned long nrValues;
+    unsigned long nrListElems;
     unsigned long nrEvaluated;
     unsigned int recursionDepth;
     unsigned int maxRecursionDepth;