No description
Find a file
Eelco Dolstra 81e7c40264 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.
2021-11-04 15:03:40 +01:00
.github install-nix-actionv@v14.1 2021-11-02 08:24:17 -06:00
config
contrib
doc/manual Fix typos 2021-11-03 18:11:20 +02:00
m4
maintainers Update release script 2021-11-02 11:53:25 +01:00
misc
mk mk/libraries.mk: fix trace-ld and trace-ar expansions 2021-10-08 22:59:42 +01:00
nix-rust
perl
scripts Reword "we"s to "I"s for consistency 2021-11-03 18:42:32 -06:00
src Optimize primop calls 2021-11-04 15:03:40 +01:00
tests Merge remote-tracking branch 'origin/master' into non-blocking-gc 2021-10-28 14:56:55 +02:00
.dir-locals.el
.editorconfig
.gitignore
.version
boehmgc-coroutine-sp-fallback.diff Fix leaking pthread_attr_t 2021-11-03 22:54:16 +01:00
bootstrap.sh
configure.ac
COPYING
default.nix
flake.lock
flake.nix Merge remote-tracking branch 'origin/master' into non-blocking-gc 2021-10-28 14:56:55 +02:00
local.mk
Makefile
Makefile.config.in
precompiled-headers.h
README.md
shell.nix

Nix

Open Collective supporters Test

Nix is a powerful package manager for Linux and other Unix systems that makes package management reliable and reproducible. Please refer to the Nix manual for more details.

Installation

On Linux and macOS the easiest way to install Nix is to run the following shell command (as a user other than root):

$ curl -L https://nixos.org/nix/install | sh

Information on additional installation methods is available on the Nix download page.

Building And Developing

See our Hacking guide in our manual for instruction on how to build nix from source with nix-build or how to get a development environment.

Additional Resources

License

Nix is released under the LGPL v2.1.