In my own experiences I have noticed that it really depends on how excited and into the sex I get.
One thing is for sure, my dick knows the difference between masturbation and real sex because masturbation induced ejaculation tends to yield the poorest results. My boys are smart, they ain't coming out unless it's the real thing lol
Diet I don't think makes much of a difference although I will try the celery suggestion here to see how that affects it with a partner and without.
Happy hobbying,
Ron