Help speeding up a test progam from a book

That’s damn good! Great!