It's certainly not linear, though; I think it will be interesting to see what's better in the long run. It's obviously impossible to measure, due to unpredictable factors such as changes in industry and market and competition.
As a whole, though, I think people, especially in our industry, aren't stupid. Free food would certainly be a more competitive retention factor (than ping pong) -- barring that your company's biggest competitors in terms of hiring aren't also offering free food.
"Hey, we have a dysfunctional CEO, a runway shorter than the one at Hong Kong airport, and a legacy codebase that reduces the most experienced developer to a gibbering wreck. But look - we have foosball and whiskey tasting nights!"
Sure, it's a semi-facetious example. But I'm suspicious of job ads that mention things like foosball tables or climbing walls and other such frivolities - it suggests either a juvenile working environment or that the company has to provide gimmicks to entice people to work there because it doesn't have anything solid to offer.
The ROI on those "gimmicks" is huge - to my mind it's the company that wouldn't spend a small amount of money on something fun that's suspicious. That suggests a company that's more bothered about appearances/"professionalism" than just getting on with things.
Juvenile, shrug - I guess I like a juvenile working environment.