diff options
author | Adam Joseph <adam@westernsemico.com> | 2022-10-19T05·31-0700 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-10-19T10·37+0000 |
commit | c91d86ee5ccada2c3868170f263be2b3d396d759 (patch) | |
tree | 7f575f56ce842b6fa7402a44f66b7459c081337d /tvix/eval/src/source.rs | |
parent | 4b01e594d5d5cb806f6fe6eef1c30069748369cd (diff) |
feat(tvix/eval): NixList::concat(): avoid an unnecessary move r/5158
In `a++b`, the previous implementation would move `b` (i.e. memcpy its elements) twice. Let's do that only once. We sure do call NixList.clone() a whole lot. At some point in the future we probably want to do a SmolStr-type split for NixList into a two-variant enum where one side is an Rc<Vec<Value>> for lists longer than a certain length. Signed-off-by: Adam Joseph <adam@westernsemico.com> Change-Id: I32154d18785a1f663454a8b9d4afd3e78bffdf9c Reviewed-on: https://cl.tvl.fyi/c/depot/+/7040 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/eval/src/source.rs')
0 files changed, 0 insertions, 0 deletions