speed up execution from 11 to 5 seconds
This commit is contained in:
parent
94d022bd01
commit
e49e9b5ff7
1 changed files with 1 additions and 1 deletions
|
@ -163,7 +163,7 @@ fn main() -> anyhow::Result<()> {
|
||||||
let cpu = cpu.clone();
|
let cpu = cpu.clone();
|
||||||
let results = Arc::clone(&results);
|
let results = Arc::clone(&results);
|
||||||
let handle = thread::spawn(move || {
|
let handle = thread::spawn(move || {
|
||||||
for n in ((1000 + cpu * 1000)..=100000).step_by(1000 + cpu * 1000) {
|
for n in ((1000 + cpu * 1000)..=100000).step_by(1000 * num_cpus) {
|
||||||
if results.read().expect("can't read results map").get(&(n as u64)).is_some() {
|
if results.read().expect("can't read results map").get(&(n as u64)).is_some() {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue