Recent studies have concluded it’s better not to eat before you work out, but some experts say there are good reasons for grabbing a snack before you exercise.

To eat or not to eat.

That is the question for many people before they go out and exercise.

Researchers have been trying to answer that query for decades.

The results of a recent study from the American Journal of Physiology – Endocrinology and Metabolismmakes a case for not eating. At least for overweight men.

The researchers say that fasting before aerobic exercise results in higher fat burning rates than exercising after eating.

This confirms findings from a similar 2016 study in the British Journal of Nutrition.

Another study from 2013 even qualified the improvement, stating that overnight fasting before exercising (i.e., skipping breakfast) can result in as much as a 20 percent increase in fat burn compared with eating breakfast before a workout.

Read more: What exercises are best »

The advice on eating and exercise, however, is not one-size-fits-all.

“From a performance standpoint, it’s better to eat before exercising,” Jennifer Lea, director of client training and performance coach at the Johnson & Johnson Human Performance Institute, told Healthline. “Food is fuel, and people perform better when they have fuel in their body.”

If you intend to skip a meal before you hit the gym, first consider your goals. While not eating may seem like an obvious strategy to lose weight, fasting may prove less than optimal for overall fitness.

When the body’s fuel (glycogen) runs low, your body will break down fat, but it will also break down protein, the muscles’ building blocks.

“Eating throughout the day will keep the muscles’ glycogen levels up, so you’ll be building muscle when you exercise,” Lea said.

“We can create calorie deficits where the body is going to lose weight, but it will also affect body composition,” Lea added. “Fasting provides faster weight loss [than exercise alone], but muscle mass is lost as well. Muscle mass helps with aging, performance, and metabolism. You want fat loss, but you also want to preserve muscle mass.”

Read more: How long does it take to get in shape? »

Your workout may also suffer if your energy stores are depleted.

While studies have focused on the effects of fasting before low-intensity exercise, the most efficient workouts are more vigorous.

“High-intensity exercise gets you the most bang for your buck,” Lea said. “Lower-intensity workouts take a longer time to get results, whereas moderate-to-vigorous activity — in particular, high-intensity interval training (HIIT) — provides the highest return for the investment of time.”

And no workout is effective if you peter out.

“For squats or a 100-meter sprint, you need energy right then and there,” Lea said. “Without eating, you’ll feel tired and weak 20 minutes into exercising. You won’t be pushing yourself into that discomfort zone where you’ll see the biggest fitness gains.”

Lea advises consuming calories before a workout — even if it’s just having a sports drink or some juice two minutes before you begin exercising.

“Have something within two hours of working out,” Lea said. “You should have carbs and a little bit of protein before and after a workout. You could have a reasonably-sized meal and exercise an hour later without any impact. Within 30 minutes of exercising, you’ll need less food — like half a banana or a slice of toast with peanut butter. Aim for 50 to 100 calories to perform at your best level.”

Keeping your energy levels up is especially important for endurance training.

For a workout that lasts more than an hour, you’ll need to replenish your electrolytes and carbohydrates before your workout — and as soon as 20 minutes in.

“People make the mistake of drinking only water for their half-marathon, but then they’re tired halfway through,” Lea says. “You should be supplementing throughout.”

And yet, we all know people who can jump out of bed and log 10 miles running without a bite of food.

“They’ve trained their bodies to not be hungry in the morning,” Lea said. “But these people should have a small snack — even just liquids — before a morning workout. They should retrain their bodies to be a little bit hungry.”

Read more: Are expensive fitness classes worth it? »

Of course, chowing down on a donut before a set of burpees is a bad idea.

You should generally avoid high-sugar foods but eating these right before a workout is especially regrettable.

High-acid foods, fatty food, and even dairy products before exercising also tend to upset people’s stomachs.

But outside of those, test different types of food and the timing of your eating to find out what works best for you.

“Some people might need 45 minutes to let any food settle,” Lea said, “while others can have a snack as they’re running out the door.”