Absolutely! I did keto for a while: I was literally able to have productive 12+ hour days that way. Having perfectly stable blood sugar (or rather the lack of it) did wonders for my concentration.
The downside: I lost too much weight, got terrible keto rash, and had constant bad breath. Also no social food events at all.
I’ve since settled on a mixed diet with lots of animal protein and whole grain carbs. This is a sustainable compromise that still positively influences my ability to focus and my physical performance.