tf-encrypted / moose

Secure distributed dataflow framework for encrypted machine learning and data processing
Apache License 2.0
58 stars 16 forks source link

Elk memory: avoid cloning computation in `update_types_one_hop` #968

Closed mortendahl closed 2 years ago

mortendahl commented 2 years ago

The entire computation is currently cloned in update_types_one_hop:

pub(crate) fn update_types_one_hop(comp: &Computation) -> anyhow::Result<Option<Computation>> {
    let mut operations = comp.operations.clone();
    ...

Maybe this can be avoided, not least if we allow update_types_one_hop to consume comp.