tvl-depot/src/libexpr
Eelco Dolstra b9e5b908ed Provide an efficient implementation of ‘elem’
The one in Nixpkgs is O(n^2), this one is O(n).  Big reduction in the
number of list allocations.

Statistics before (on a NixOS system config):

  time elapsed: 1.17982
  size of a value: 24
  environments allocated: 1543334 (39624560 bytes)
  list elements: 9612638 (76901104 bytes)
  list concatenations: 37434
  values allocated: 1854933 (44518392 bytes)
  attribute sets allocated: 392040
  right-biased unions: 186334
  values copied in right-biased unions: 591137
  symbols in symbol table: 18272
  number of thunks: 1392467
  number of thunks avoided: 1507311
  number of attr lookups: 430801
  number of primop calls: 691600
  number of function calls: 1492502

Statistics after:

  time elapsed: 1.08683
  size of a value: 24
  environments allocated: 1384376 (35809568 bytes)
  list elements: 6946783 (55574264 bytes)
  list concatenations: 37434
  values allocated: 1760440 (42250560 bytes)
  attribute sets allocated: 392040
  right-biased unions: 186334
  values copied in right-biased unions: 591137
  symbols in symbol table: 18273
  number of thunks: 1297673
  number of thunks avoided: 1380759
  number of attr lookups: 430802
  number of primop calls: 628912
  number of function calls: 1333544
2012-08-13 01:05:35 -04:00
..
attr-path.cc Fix compilation on FreeBSD 2012-03-05 22:04:40 +01:00
attr-path.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00
common-opts.cc Fix error message 2012-02-09 18:56:48 +01:00
common-opts.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00
eval-inline.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00
eval.cc Add a "filter" primop 2012-08-13 00:28:08 -04:00
eval.hh Add some more evaluations stats 2012-08-12 23:41:48 -04:00
get-drvs.cc * Inline some functions and get rid of the indirection through 2012-02-04 13:50:25 +00:00
get-drvs.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00
lexer.l * Add a Nix expression search path feature. Paths between angle 2011-08-06 16:05:24 +00:00
Makefile.am * Inline some functions and get rid of the indirection through 2012-02-04 13:50:25 +00:00
names.cc * Export the nix-env derivation name parsing and version comparison 2008-07-01 10:10:32 +00:00
names.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00
nix.sdf First attempt to update Nix SDF grammar to match the actual bison grammar 2008-06-04 14:36:46 +00:00
nixexpr.cc * Allow a default value in attribute selection by writing 2011-07-13 12:19:57 +00:00
nixexpr.hh Add some basic profiling support to the evaluator 2012-08-12 23:29:28 -04:00
parser.y Use Bison 2.5 2012-04-13 14:28:26 +02:00
primops.cc Provide an efficient implementation of ‘elem’ 2012-08-13 01:05:35 -04:00
symbol-table.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00
value-to-xml.cc Fix compilation on FreeBSD 2012-03-05 22:04:40 +01:00
value-to-xml.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00
value.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00