From 2604213e7176f67fafb3bac28ca0194bfaeb99d0 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Mon, 24 Jun 2024 15:26:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=8A=EF=BC=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- miner/src/cacluate.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/miner/src/cacluate.rs b/miner/src/cacluate.rs index b5abda0..feecadc 100644 --- a/miner/src/cacluate.rs +++ b/miner/src/cacluate.rs @@ -382,13 +382,16 @@ pub fn inner_cacl(config: &CacluateConfig, range: Range, main_namer: &mut N // 虚评 main_namer.update_skill(); - let xu = crate::evaluate::xuping::XuPing2_0_1015::evaluate(&main_namer); + let xu; let xu_qd = crate::evaluate::xuping::XuPing2_0_1015_QD::evaluate(&main_namer); - - if xu < config.xp_expect as f64 || xu_qd < config.xp_expect as f64 { - continue; + if likely((xu_qd as u32) < config.xp_expect) { + xu = crate::evaluate::xuping::XuPing2_0_1015::evaluate(&main_namer); + if likely((xu as u32) < config.xp_expect) { + continue; + } + } else { + xu = crate::evaluate::xuping::XuPing2_0_1015::evaluate(&main_namer); } - get_count += 1; info!("Id:{:>15}|{}|{:.4}|{:.4}|{}", i, full_name, xu, xu_qd, main_namer.get_info()); // 写入文件