nix-super/doc/manual/rl-next
pennae 79d3d412ca optimize derivation string parsing
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
2023-12-30 18:44:10 +01:00
..
allowed-uris-can-now-match-whole-schemes.md allowed-uris: Match whole schemes also when scheme is not followed by slashes 2023-12-11 12:18:04 +01:00
cgroup-stats.md worker protocol: serialise cgroup stats in BuildResult (#9598) 2023-12-13 16:37:17 -05:00
config Compile hand-written release notes with changelog-d 2023-11-24 15:13:21 +01:00
drv-string-parse-hang.md optimize derivation string parsing 2023-12-30 18:44:10 +01:00
eval-system.md Add release not for eval-system 2023-12-14 19:55:50 -05:00
hash-format-nix32.md rl-next: Use markdown frontmatter syntax 2023-12-09 19:57:55 +01:00
mounted-ssh-store.md rl-next: Use markdown frontmatter syntax 2023-12-09 19:57:55 +01:00
nix-config-show.md rl-next: Use markdown frontmatter syntax 2023-12-09 19:57:55 +01:00
nix-env-json-drv-path.md rl-next: Use markdown frontmatter syntax 2023-12-09 19:57:55 +01:00
nix-hash-convert.md rl-next: Use markdown frontmatter syntax 2023-12-09 19:57:55 +01:00
nix-profile-names.md Fix release notes 2023-12-21 16:38:25 +01:00
source-positions-in-errors.md rl-next: Use markdown frontmatter syntax 2023-12-09 19:57:55 +01:00