Refactor code structure and improve performance by optimizing OpenCL kernel and adding timing macros; update Cargo.toml for release profile settings; enhance main.rs and sinks.rs for better readability and organization.

This commit is contained in:
2025-04-11 16:04:10 +02:00
parent c554b1f164
commit b04c01e737
11 changed files with 395 additions and 184 deletions

View File

@ -34,3 +34,14 @@ pub struct Match {
pub z: u16,
pub percent: f32,
}
#[macro_export]
macro_rules! time {
($name:ident, $body:block) => {{
let start = std::time::Instant::now();
let result = $body;
let duration = start.elapsed();
println!("{} took {:?}", stringify!($name), duration);
result
}};
}