Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge environments of nested functions #3718

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Commits on Nov 5, 2021

  1. Merge environments of nested functions

    Previously an expression like 'x: y: ...' would create two
    environments with one value. Now it creates one environment with two
    values. This reduces the number of allocations and the distance in the
    environment chain that variable lookups need to traverse.
    
    On
    
      $ nix-instantiate --dry-run '<nixpkgs/nixos/release-combined.nix>' -A nixos.tests.simple.x86_64-linux
    
    this gives a ~30% reduction in the number of Env allocations.
    edolstra committed Nov 5, 2021
    Configuration menu
    Copy the full SHA
    904d0ec View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5253cb4 View commit details
    Browse the repository at this point in the history