mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-29 17:16:15 +02:00
79d3d412ca
a bunch of derivation strings contain no escape sequences. we can optimize for this fact by first scanning for the end of a derivation string and simply returning the contents unmodified if no escape sequences were found. to make this even more efficient we can also use BackedStringViews to avoid copies, avoiding heap allocations for transient data. before: Benchmark 1: nix eval --raw --impure --expr 'with import <nixpkgs/nixos> {}; system' Time (mean ± σ): 6.952 s ± 0.015 s [User: 5.294 s, System: 1.452 s] Range (min … max): 6.926 s … 6.974 s 10 runs after: Benchmark 1: nix eval --raw --impure --expr 'with import <nixpkgs/nixos> {}; system' Time (mean ± σ): 6.907 s ± 0.012 s [User: 5.272 s, System: 1.429 s] Range (min … max): 6.893 s … 6.926 s 10 runs |
||
---|---|---|
.. | ||
allowed-uris-can-now-match-whole-schemes.md | ||
cgroup-stats.md | ||
config | ||
drv-string-parse-hang.md | ||
eval-system.md | ||
hash-format-nix32.md | ||
mounted-ssh-store.md | ||
nix-config-show.md | ||
nix-env-json-drv-path.md | ||
nix-hash-convert.md | ||
nix-profile-names.md | ||
source-positions-in-errors.md |