You don't say which photo resistor you're using, but checking the data sheets of a few common ones shows that they have fairly slow response times, of around 20-30ms. If yours is similar, it would probably have trouble responding faster than about 20 times a second. Perhaps you might like to consider using a faster sensor, such as a photodiode or phototransistor.
I don't see any timing related problems with your code, which, and although you don't say which model of Photon you are using, I would expect to be able to handle at least several thousand counts per second.