diff options
author | Vincent Ambo <mail@tazj.in> | 2022-12-12T00·00+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-12-21T21·48+0000 |
commit | 87995ed35575e31ee881c796a901fdf4005a6ccb (patch) | |
tree | 262b0be7bce562f53378993c6830cfb92f0f0a9e /tvix/eval/src/tests/tvix_tests/eval-okay-eq-float.exp | |
parent | 922bf7aca9f4d4f4834ba5de7841ff58015c8791 (diff) |
refactor(tvix/eval): add name-based index over compiler's locals r/5454
Instead of finding locals by doing 2x O(n) walks over the compiler's locals list, use a secondary name-based index for resolving locals by name. Previously, almost 60% (!!) of eval time on some expressions over nixpkgs was spent in `Local::has_name`. This function doesn't even exist anymore now, and eval speed about doubles as a result. Note that this doesn't exactly make the locals code easier to read, but I'm also not sure what we can simplify in there in general. This fixes b/227. Change-Id: I29ce5eb9452b02d3b358c673e1f5cf8082e2fef9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7560 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-eq-float.exp')
0 files changed, 0 insertions, 0 deletions