1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 23:42:43 +01:00

Store contexts as symbols

This provides some deduplication since most contexts are used multiple
times.

Also, store singleton contexts directly in the Value object. This
saves a 16-byte Context object. This is useful because the vast
majority of contexts are singletons, e.g. 23723 out of 26138 in a
NixOS 19.03 system configuration.
This commit is contained in:
Eelco Dolstra 2019-04-23 11:07:47 +02:00
parent e392ff53e9
commit 2160258cc4
8 changed files with 78 additions and 37 deletions

View file

@ -20,6 +20,7 @@ enum Tag {
tEnv,
tWithExprEnv,
tWithAttrsEnv,
tContext,
// Value tags
tInt,