Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nix
base: b7e6b5de91d9
Choose a base ref
...
head repository: NixOS/nix
compare: 98fec91bc3b6
Choose a head ref
  • 17 commits
  • 22 files changed
  • 2 contributors

Commits on Feb 20, 2020

  1. Copy the full SHA
    f6fd01b View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2020

  1. Fix GC failures on bad store path names

    It failed on names like '/nix/store/9ip48nkc9rfy0a4yaw98lp6gipqlib1a-'.
    edolstra committed Feb 28, 2020
    Copy the full SHA
    22a754c View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2020

  1. Add test for foldl'

    edolstra committed Mar 4, 2020
    Copy the full SHA
    d700eec View commit details
    Browse the repository at this point in the history
  2. builtins.cache: Cache regular expressions

    The evaluator was spending about 1% of its time compiling a small
    number of regexes over and over again.
    edolstra committed Mar 4, 2020
    Copy the full SHA
    401b5bc View commit details
    Browse the repository at this point in the history
  3. Optimise Derivation::unparse()

    In
    
      nix-instantiate --dry-run '<nixpkgs/nixos/release-combined.nix>' -A nixos.tests.simple.x86_64-linux
    
    this reduces time spent in unparse() from 9.15% to 4.31%. The main
    culprit was appending characters one at a time to the destination
    string. Even though the string has enough capacity, push_back() still
    needs to check this on every call.
    edolstra committed Mar 4, 2020
    Copy the full SHA
    75db069 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    887030f View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    d37dc71 View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    73b6d87 View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2020

  1. Copy the full SHA
    f2be8ae View commit details
    Browse the repository at this point in the history
  2. Optimize primop calls

    We now parse function applications as a vector of arguments rather
    than as a chain of binary applications, e.g. 'substring 1 2 "foo"' is
    parsed as
    
      ExprCall { .fun = <substring>, .args = [ <1>, <2>, <"foo"> ] }
    
    rather than
    
      ExprApp (ExprApp (ExprApp <substring> <1>) <2>) <"foo">
    
    This allows primops to be called immediately (if enough arguments are
    supplied) without having to allocate intermediate tPrimOpApp values.
    
    On
    
      $ nix-instantiate --dry-run '<nixpkgs/nixos/release-combined.nix>' -A nixos.tests.simple.x86_64-linux
    
    this gives a substantial performance improvement:
    
      user CPU time:      median =      0.9209  mean =      0.9218  stddev =      0.0073  min =      0.9086  max =      0.9340  [rejected, p=0.00000, Δ=-0.21433±0.00677]
      elapsed time:       median =      1.0585  mean =      1.0584  stddev =      0.0024  min =      1.0523  max =      1.0623  [rejected, p=0.00000, Δ=-0.20594±0.00236]
    
    because it reduces the number of tPrimOpApp allocations from 551990 to
    42534 (i.e. only small minority of primop calls are partially
    applied) which in turn reduces time spent in the garbage collector.
    edolstra committed Mar 5, 2020
    Copy the full SHA
    34e7c35 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    7705759 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    8fc2843 View commit details
    Browse the repository at this point in the history
  5. Fix derivation primop

    edolstra committed Mar 5, 2020
    Copy the full SHA
    f2a08ea View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    59fca8c View commit details
    Browse the repository at this point in the history
  7. Remove maxPrimOpArity

    edolstra committed Mar 5, 2020
    Copy the full SHA
    6ee970a View commit details
    Browse the repository at this point in the history
  8. 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 Mar 5, 2020
    Copy the full SHA
    e91a590 View commit details
    Browse the repository at this point in the history
  9. Copy the full SHA
    98fec91 View commit details
    Browse the repository at this point in the history