Another factor of 10 of speed. Now 1000 times faster than Ruby with identical alogorithm.