Fix suboptimal flops

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-06-09 10:13:49 +00:00
parent a8de5d1e60
commit c3c91e9d80
2 changed files with 1 additions and 2 deletions

View file

@ -721,7 +721,6 @@ option_if_let_else = { level = "allow", priority = 1 } # TODO
redundant_pub_crate = { level = "allow", priority = 1 } # TODO redundant_pub_crate = { level = "allow", priority = 1 } # TODO
significant_drop_in_scrutinee = { level = "allow", priority = 1 } # TODO significant_drop_in_scrutinee = { level = "allow", priority = 1 } # TODO
significant_drop_tightening = { level = "allow", priority = 1 } # TODO significant_drop_tightening = { level = "allow", priority = 1 } # TODO
suboptimal_flops = { level = "allow", priority = 1 } # TODO
use_self = { level = "allow", priority = 1 } # TODO use_self = { level = "allow", priority = 1 } # TODO
useless_let_if_seq = { level = "allow", priority = 1 } # TODO useless_let_if_seq = { level = "allow", priority = 1 } # TODO

View file

@ -109,7 +109,7 @@ impl KeyValueDatabaseEngine for Arc<Engine> {
clippy::cast_sign_loss clippy::cast_sign_loss
)] )]
let cache_size_per_thread = ((config.db_cache_capacity_mb * 1024.0) let cache_size_per_thread = ((config.db_cache_capacity_mb * 1024.0)
/ ((conduit::utils::available_parallelism() as f64 * 2.0) + 1.0)) as u32; / (conduit::utils::available_parallelism() as f64).mul_add(2.0, 1.0)) as u32;
let writer = Mutex::new(Engine::prepare_conn(&path, cache_size_per_thread)?); let writer = Mutex::new(Engine::prepare_conn(&path, cache_size_per_thread)?);