Make Env smaller
Commit 20866a7031 added a ‘withAttrs’
field to Env, which is annoying because it makes every Env structure
bigger and we allocate millions of them. E.g. NixOS evaluation took
18 MiB more. So this commit squeezes ‘withAttrs’ into values[0].
Probably should use a union...
This commit is contained in:
+2
-2
@@ -52,8 +52,8 @@ struct PrimOp
|
||||
struct Env
|
||||
{
|
||||
Env * up;
|
||||
unsigned int prevWith; // nr of levels up to next `with' environment
|
||||
Expr * withAttrs;
|
||||
unsigned short prevWith; // nr of levels up to next `with' environment
|
||||
bool haveWithAttrs;
|
||||
Value * values[0];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user