Refactor: Replace optimization level with boolean flag

The optimizer now uses a simple boolean flag (`optimization`) instead of
an `optimization_level` (u32). This simplifies the optimizer's logic and
makes it easier to enable or disable optimizations.

The command-line interface and internal testing have been updated to
reflect this change.
This commit is contained in:
Michael Schimmel
2026-02-22 01:50:14 +01:00
parent d3cdafbb85
commit 7c997ca841
7 changed files with 52 additions and 49 deletions
+4 -4
View File
@@ -31,15 +31,15 @@ struct Cli {
#[arg(short, long)]
trace: bool,
/// Optimization level (0: None, 1: Cracking, 2: Aggressive)
#[arg(short, long, default_value_t = 0)]
opt: u32,
/// Disable optimization
#[arg(long)]
no_opt: bool,
}
fn main() {
let cli = Cli::parse();
let mut env = Environment::new();
env.optimization_level = cli.opt;
env.optimization = !cli.no_opt;
if cli.bench || cli.update_bench {
if cfg!(debug_assertions) {