chore: remove time dep (#22665)
* chore: bump time from 0.3.5 to 0.3.6 Bumps [time](https://github.com/time-rs/time) from 0.3.5 to 0.3.6. - [Release notes](https://github.com/time-rs/time/releases) - [Changelog](https://github.com/time-rs/time/blob/main/CHANGELOG.md) - [Commits](https://github.com/time-rs/time/compare/v0.3.5...v0.3.6) --- updated-dependencies: - dependency-name: time dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Remove separate time dependency Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tyera Eulberg <tyera@solana.com>
This commit is contained in:
@ -33,8 +33,5 @@ subtle = "2"
|
||||
thiserror = "1"
|
||||
zeroize = { version = "1.3", default-features = false, features = ["zeroize_derive"] }
|
||||
|
||||
[dev-dependencies]
|
||||
time = "0.1.40"
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib", "rlib"]
|
||||
|
@ -113,7 +113,9 @@ impl Iterator for RistrettoIterator {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use {super::*, curve25519_dalek::constants::RISTRETTO_BASEPOINT_POINT as G};
|
||||
use {
|
||||
super::*, curve25519_dalek::constants::RISTRETTO_BASEPOINT_POINT as G, std::time::Instant,
|
||||
};
|
||||
|
||||
#[test]
|
||||
#[allow(non_snake_case)]
|
||||
@ -147,23 +149,17 @@ mod tests {
|
||||
};
|
||||
|
||||
// Very informal measurements for now
|
||||
let start_precomputation = time::precise_time_s();
|
||||
let start_precomputation = Instant::now();
|
||||
let precomputed_hashmap = decode_u32_precomputation(G);
|
||||
let end_precomputation = time::precise_time_s();
|
||||
let precomputation_secs = start_precomputation.elapsed().as_secs_f64();
|
||||
|
||||
let start_online = time::precise_time_s();
|
||||
let start_online = Instant::now();
|
||||
let computed_amount = instance.decode_u32_online(&precomputed_hashmap).unwrap();
|
||||
let end_online = time::precise_time_s();
|
||||
let online_secs = start_online.elapsed().as_secs_f64();
|
||||
|
||||
assert_eq!(amount, computed_amount);
|
||||
|
||||
println!(
|
||||
"16/16 Split precomputation: {:?} sec",
|
||||
end_precomputation - start_precomputation
|
||||
);
|
||||
println!(
|
||||
"16/16 Split online computation: {:?} sec",
|
||||
end_online - start_online
|
||||
);
|
||||
println!("16/16 Split precomputation: {:?} sec", precomputation_secs);
|
||||
println!("16/16 Split online computation: {:?} sec", online_secs);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user