forked from lix-project/lix
72f42093e7
mainly to avoid an allocation and a copy of a string that can be modified in place (ever since EvalState holds on to the buffer, not the generated parser itself). # before Benchmark 1: nix search --offline nixpkgs hello Time (mean ± σ): 571.7 ms ± 2.4 ms [User: 563.3 ms, System: 8.0 ms] Range (min … max): 566.7 ms … 579.7 ms 50 runs Benchmark 2: nix eval -f ../nixpkgs/pkgs/development/haskell-modules/hackage-packages.nix Time (mean ± σ): 376.6 ms ± 1.0 ms [User: 345.8 ms, System: 30.5 ms] Range (min … max): 374.5 ms … 379.1 ms 50 runs Benchmark 3: nix eval --raw --impure --expr 'with import <nixpkgs/nixos> {}; system' Time (mean ± σ): 2.922 s ± 0.006 s [User: 2.707 s, System: 0.215 s] Range (min … max): 2.906 s … 2.934 s 50 runs # after Benchmark 1: nix search --offline nixpkgs hello Time (mean ± σ): 570.4 ms ± 2.8 ms [User: 561.3 ms, System: 8.6 ms] Range (min … max): 564.6 ms … 578.1 ms 50 runs Benchmark 2: nix eval -f ../nixpkgs/pkgs/development/haskell-modules/hackage-packages.nix Time (mean ± σ): 375.4 ms ± 1.3 ms [User: 343.2 ms, System: 31.7 ms] Range (min … max): 373.4 ms … 378.2 ms 50 runs Benchmark 3: nix eval --raw --impure --expr 'with import <nixpkgs/nixos> {}; system' Time (mean ± σ): 2.925 s ± 0.006 s [User: 2.704 s, System: 0.219 s] Range (min … max): 2.910 s … 2.942 s 50 runs |
||
---|---|---|
.. | ||
flake | ||
primops | ||
attr-path.cc | ||
attr-path.hh | ||
attr-set.cc | ||
attr-set.hh | ||
common-eval-args.cc | ||
common-eval-args.hh | ||
eval-cache.cc | ||
eval-cache.hh | ||
eval-inline.hh | ||
eval.cc | ||
eval.hh | ||
fetchurl.nix | ||
function-trace.cc | ||
function-trace.hh | ||
get-drvs.cc | ||
get-drvs.hh | ||
imported-drv-to-derivation.nix | ||
json-to-value.cc | ||
json-to-value.hh | ||
lexer.l | ||
local.mk | ||
nix-expr.pc.in | ||
nixexpr.cc | ||
nixexpr.hh | ||
parser.y | ||
primops.cc | ||
primops.hh | ||
symbol-table.hh | ||
value-to-json.cc | ||
value-to-json.hh | ||
value-to-xml.cc | ||
value-to-xml.hh | ||
value.hh |