Fasting had the same effect for me. I was constantly thinking about substitutes for sugar laden treats like almond joys, donuts and chocolate pudding. for a while, dark chocolate, almond butter, coconut flour and stevia were my best friends, but as soon as i started fasting, these cravings started to disappear.
My entry into fasting was thanks to this interview with Jason Fung and Mike Mutzel of on Youtube-- link
i started for the cravings, but i stayed for the clarity. I feel more productive and generally think my neurons are firing faster than they were when i was constantly eating. if that makes sense.