Compare commits
No commits in common. "a3b47f3e4702f597a6652a4042e96fc9bb12762d" and "8f3bb2cd58bb94464fc07f85433b0352abed9594" have entirely different histories.
a3b47f3e47
...
8f3bb2cd58
|
@ -1,18 +1,7 @@
|
|||
|
||||
use std::time::Instant;
|
||||
|
||||
use powlib::{self, gen::{POWRange, POWChallenge}, hash::hash_num, num::Num};
|
||||
use powlib::{self, gen::{POWRange, POWChallenge}};
|
||||
|
||||
fn main() {
|
||||
{
|
||||
let num = Num::new(473823);
|
||||
let time = Instant::now();
|
||||
hash_num(num);
|
||||
println!("Simple hash of {} took {} millis", u128::from(num), time.elapsed().as_millis());
|
||||
}
|
||||
{
|
||||
let time = Instant::now();
|
||||
let challenge = POWChallenge::make(POWRange::new(0, 20480));
|
||||
println!("Solvling {} took {} seconds", challenge.solve_singlethread(), time.elapsed().as_secs_f32());
|
||||
}
|
||||
let challenge = POWChallenge::make(POWRange::new(0, 20480));
|
||||
println!("{}", challenge.solve_singlethread());
|
||||
}
|
|
@ -29,9 +29,3 @@ impl From<u128> for Num {
|
|||
Num { number }
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Num> for u128 {
|
||||
fn from(value: Num) -> Self {
|
||||
value.number
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue