25x speedup by moving to switch table
This commit is contained in:
@@ -19,12 +19,12 @@ fun main(args: Array<String>) {
|
||||
cpu.runState = CPU.RunState.RUNNING
|
||||
cpu.pc = 0x80u
|
||||
val start = System.nanoTime()
|
||||
val ninsn = cpu.run(50000000)
|
||||
val ninsn = cpu.run(600000000)
|
||||
val end = System.nanoTime()
|
||||
|
||||
System.err.println("Halted at 0${cpu.pc.toString(8)}")
|
||||
val time = (end - start).toDouble() / 1_000_000_000.0
|
||||
println("Executed ${ninsn} in ${time}s: ${ninsn / time} i/s")
|
||||
println("Executed ${ninsn} in ${time}s: ${ninsn / time / 1_000_000} MIPS")
|
||||
} finally {
|
||||
println("Exiting")
|
||||
console.stop()
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user