pub struct BenchmarkResults {
pub simd_time: Option<Duration>,
pub parallel_time: Duration,
pub serial_time: Duration,
}
Expand description
Benchmark results for different optimization strategies
Fields§
§simd_time: Option<Duration>
Time taken by SIMD implementation
parallel_time: Duration
Time taken by parallel implementation
serial_time: Duration
Time taken by serial implementation
Implementations§
Source§impl BenchmarkResults
impl BenchmarkResults
Sourcepub fn parallel_speedup(&self) -> f64
pub fn parallel_speedup(&self) -> f64
Get speedup of parallel vs serial
Sourcepub fn simd_speedup(&self) -> Option<f64>
pub fn simd_speedup(&self) -> Option<f64>
Get speedup of SIMD vs serial
Sourcepub fn best_strategy(&self) -> &'static str
pub fn best_strategy(&self) -> &'static str
Get the best performing strategy
Trait Implementations§
Source§impl Clone for BenchmarkResults
impl Clone for BenchmarkResults
Source§fn clone(&self) -> BenchmarkResults
fn clone(&self) -> BenchmarkResults
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BenchmarkResults
impl Debug for BenchmarkResults
Source§impl Default for BenchmarkResults
impl Default for BenchmarkResults
Source§fn default() -> BenchmarkResults
fn default() -> BenchmarkResults
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BenchmarkResults
impl RefUnwindSafe for BenchmarkResults
impl Send for BenchmarkResults
impl Sync for BenchmarkResults
impl Unpin for BenchmarkResults
impl UnwindSafe for BenchmarkResults
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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