nix-super/doc/manual/rl-next
pennae 1fe66852ff reduce the size of Env by one pointer
since `up` and `values` are both pointer-aligned the type field will
also be pointer-aligned, wasting 48 bits of space on most machines. we
can get away with removing the type field altogether by encoding some
information into the `with` expr that created the env to begin with,
reducing the GC load for the absolutely massive amount of single-entry
envs we create for lambdas. this reduces memory usage of system eval by
quite a bit (reducing heap size of our system eval from 8.4GB to 8.23GB)
and gives similar savings in eval time.

running `nix eval --raw --impure --expr 'with import <nixpkgs/nixos> {}; system'`

before:

  Time (mean ± σ):      5.576 s ±  0.003 s    [User: 5.197 s, System: 0.378 s]
  Range (min … max):    5.572 s …  5.581 s    10 runs

after:

  Time (mean ± σ):      5.408 s ±  0.002 s    [User: 5.019 s, System: 0.388 s]
  Range (min … max):    5.405 s …  5.411 s    10 runs
2023-12-30 18:55:13 +01:00
..
allowed-uris-can-now-match-whole-schemes.md allowed-uris: Match whole schemes also when scheme is not followed by slashes 2023-12-11 12:18:04 +01:00
cgroup-stats.md worker protocol: serialise cgroup stats in BuildResult (#9598) 2023-12-13 16:37:17 -05:00
config Compile hand-written release notes with changelog-d 2023-11-24 15:13:21 +01:00
env-size-reduction.md reduce the size of Env by one pointer 2023-12-30 18:55:13 +01:00
eval-system.md Add release not for eval-system 2023-12-14 19:55:50 -05:00
hash-format-nix32.md rl-next: Use markdown frontmatter syntax 2023-12-09 19:57:55 +01:00
mounted-ssh-store.md rl-next: Use markdown frontmatter syntax 2023-12-09 19:57:55 +01:00
nix-config-show.md rl-next: Use markdown frontmatter syntax 2023-12-09 19:57:55 +01:00
nix-env-json-drv-path.md rl-next: Use markdown frontmatter syntax 2023-12-09 19:57:55 +01:00
nix-hash-convert.md rl-next: Use markdown frontmatter syntax 2023-12-09 19:57:55 +01:00
nix-profile-names.md Fix release notes 2023-12-21 16:38:25 +01:00
source-positions-in-errors.md rl-next: Use markdown frontmatter syntax 2023-12-09 19:57:55 +01:00
with-error-reporting.md reduce the size of Env by one pointer 2023-12-30 18:55:13 +01:00