Bombe: optimise

This cuts about 85% off the execution time.
This commit is contained in:
s2224834 2019-01-09 20:44:14 +00:00
parent e74c86842b
commit 8c757d1e03
2 changed files with 157 additions and 57 deletions

View file

@ -27,6 +27,7 @@ TestRegister.addTests([
]
},
{
// This test produces a menu that doesn't use the first letter, which is also a good test
name: "Bombe: 3 rotor (other stecker)",
input: "JBYALIHDYNUAAVKBYM",
expectedMatch: /LGA \(plugboard: AG\): QFIMUMAFKMQSKMYNGW/,
@ -80,8 +81,7 @@ TestRegister.addTests([
}
]
},
/*
* Long test is long
// This test is a bit slow - it takes about 12s on my test hardware
{
name: "Bombe: 4 rotor",
input: "LUOXGJSHGEDSRDOQQX",
@ -100,7 +100,6 @@ TestRegister.addTests([
}
]
},
*/
{
name: "Bombe: no crib",
input: "JBYALIHDYNUAAVKBYM",