1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 08:31:16 +02:00

* When allocating an attribute set, reserve enough space for all

elements.  This prevents the vector from having to resize itself.
This commit is contained in:
Eelco Dolstra 2010-10-24 20:09:37 +00:00
parent e0b7fb8f27
commit 43535499f3
4 changed files with 21 additions and 28 deletions

View file

@ -319,13 +319,11 @@ public:
Value * allocAttr(Value & vAttrs, const Symbol & name);
void mkList(Value & v, unsigned int length);
void mkAttrs(Value & v);
void mkAttrs(Value & v, unsigned int expected);
void mkThunk_(Value & v, Expr * expr);
Value * maybeThunk(Env & env, Expr * expr);
void cloneAttrs(Value & src, Value & dst);
/* Print statistics. */
void printStats();