Havlak loop algorithm benchmark written in PHP