performance improvement

This commit is contained in:
Mwa
2026-03-20 11:08:18 +01:00
parent c72e133cde
commit ff6427b020
2 changed files with 297 additions and 282 deletions

View File

@@ -303,7 +303,7 @@ fn main() -> Result<(), Error> {
let mut simulation = Computer::new(program);
#[cfg(not(feature = "debug"))]
loop {
simulation.step();
simulation.step(64);
}
#[cfg(feature = "debug")]
{
@@ -371,13 +371,13 @@ fn main() -> Result<(), Error> {
println!("cannot step, cpu killed");
break;
}
simulation.step();
simulation.step(1);
}
false
}
"r" | "run" => {
while !simulation.error {
simulation.step();
simulation.step(64);
}
false
}
@@ -408,7 +408,7 @@ fn main() -> Result<(), Error> {
while !simulation.error
&& simulation.ram[simulation.pc] != 0x8800_0000
{
simulation.step();
simulation.step(1);
}
false
}
@@ -419,7 +419,7 @@ fn main() -> Result<(), Error> {
while !simulation.error
&& simulation.pc != (v as usize / 4)
{
simulation.step();
simulation.step(1);
}
false
}