pub struct ComplexityDelta {
pub compute_order: Ordering,
pub memory_order: Ordering,
pub rationale: &'static str,
}Expand description
Strict-improvement vector along the (compute, memory) dimensions (spec §10.10.2 + §10.10.3 catalog table).
A non-empty finding must have at least one dimension
Less and the other ≤ Equal. The optimizer rejects
findings that are Equal on both dimensions.
Fields§
§compute_order: OrderingHow the compute cost of the witness compares to the input’s.
memory_order: OrderingHow its memory cost compares.
rationale: &'static strWhy the ordering holds.
Implementations§
Source§impl ComplexityDelta
impl ComplexityDelta
Sourcepub fn less_compute() -> Self
pub fn less_compute() -> Self
Rule reduces compute, no change to memory.
Sourcepub fn less_memory() -> Self
pub fn less_memory() -> Self
Rule reduces memory, no change to compute.
Sourcepub fn equal() -> Self
pub fn equal() -> Self
No change in either dimension. Used for the empty
finding; the optimizer never produces a Reduction
with this delta.
Sourcepub fn is_strict_improvement(&self) -> bool
pub fn is_strict_improvement(&self) -> bool
true if at least one dimension is strictly Less and
the other is at most Equal. Per spec §10.10.2 this is
the condition for a non-empty finding to be valid.
Trait Implementations§
Source§impl Clone for ComplexityDelta
impl Clone for ComplexityDelta
Source§fn clone(&self) -> ComplexityDelta
fn clone(&self) -> ComplexityDelta
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ComplexityDelta
impl Debug for ComplexityDelta
impl Eq for ComplexityDelta
Source§impl PartialEq for ComplexityDelta
impl PartialEq for ComplexityDelta
impl StructuralPartialEq for ComplexityDelta
Auto Trait Implementations§
impl Freeze for ComplexityDelta
impl RefUnwindSafe for ComplexityDelta
impl Send for ComplexityDelta
impl Sync for ComplexityDelta
impl Unpin for ComplexityDelta
impl UnsafeUnpin for ComplexityDelta
impl UnwindSafe for ComplexityDelta
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more