You're getting ahead of yourself. You don't say whether or not you even have a basic version working that takes a second per check. Get something functional and put tests around it so that every optimization can still be checked for correctness. It does no good to have it return in 10 milliseconds if the answer is wrong 10% of the time.
My criteria for good software:
Does it work?
Can someone else come in, make a change, and be reasonably certain no bugs were introduced?