diff options
author | Adam Joseph <adam@westernsemico.com> | 2022-10-16T00·09-0700 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-10-16T09·23+0000 |
commit | d9c497520ca0b89f49aed7c9507504b55eff49ce (patch) | |
tree | 8441726dca0d67bd72162e0da39fbc135d02d2bf /tvix/eval/src/value | |
parent | db70c672cf05f78df791ebcb20fa97c4cb786515 (diff) |
feat(tvix/eval): remove Clone instance from Chunk and Lambda r/5142
Lambda has a quite large and variable-sized runtime representation, unlike Rc<Lambda>. It would be easy to accidentally call clone() on this and create input-dependent performance regressions. Nothing in the codebase is currently using Lambda.clone(). Let's remove the derived instance. If it's really needed it is very easy to add it back in, but whoever does that will have to look at the struct they're adding Clone to, which will hopefully prompt them to think about whether or not that's really what they want to do. Change-Id: I7806a741862ab4402229839ce3f4ea75aafd6d12 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7029 Autosubmit: Adam Joseph <adam@westernsemico.com> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/value')
-rw-r--r-- | tvix/eval/src/value/function.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tvix/eval/src/value/function.rs b/tvix/eval/src/value/function.rs index c875b82aee05..6287cf76b81d 100644 --- a/tvix/eval/src/value/function.rs +++ b/tvix/eval/src/value/function.rs @@ -9,7 +9,7 @@ use crate::{ upvalues::{UpvalueCarrier, Upvalues}, }; -#[derive(Clone, Debug, PartialEq)] +#[derive(Debug, PartialEq)] pub struct Lambda { // name: Option<NixString>, pub(crate) chunk: Chunk, |