performance improvement
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user