TORONTO -- Could going for a jog give a person the same working memory boost as a cup of coffee?

According to a new study from Western University, the effects of exercise and caffeine on a person’s brain might be more comparable than we think.

Previous studies have proven that both exercise and caffeine help to sharpen cognitive functions, such as alertness and working memory, which is how we process and hold onto information in the moment.

“Like remembering items on a grocery list after you’ve driven to the store or recalling how each royal is related to one another on The Crown while binge-watching Season 3,” a press release on the study explained.

However, a direct comparison between these two energy-boosters to look at whether their respective effect on the brain is similar or not has never been performed before.

This was one of the aims of the study published in Nature Scientific Reports in late December.

Another goal was to look at the question of withdrawal. If a heavy caffeine user tries to take a break from caffeine, they could experience withdrawal symptoms, such as headaches, tiredness or difficulty focusing.

Exercise has frequently been suggested for those experiencing nicotine withdrawal as a method of reducing cravings and withdrawal symptoms. But could it do the same for caffeine withdrawal?

In the study, researchers compared first how working memory was affected by one bout of aerobic exercise -- a brisk, 20-minute walk on a treadmill -- versus one cup of coffee. Both methods were tested with 30 participants who had caffeine and 29 participants who didn’t, all adults between the ages of 18 to 40.

The second stage of the research was to look at whether going for a walk for 20 minutes could reduce caffeine withdrawal symptoms in 25 of the individuals who had caffeine in the first part of the study, but had been deprived of it for a 12-hour period.

The study found that drinking coffee and going for a walk had a similar effect on working memory, with both of them promoting improvements. And for those who were used to having caffeine, exercise had a slightly more positive effect than drinking the same old cup of joe.

This might be because the participants well versed in caffeine consumption “have likely developed some level of tolerance to the caffeine-driven cognitive effects,” the study says.

Exercise also helped to cut down on caffeine withdrawal symptoms to the same degree as having more caffeine would cut down on symptoms, with participants reporting a higher alertness and mood after going for a walk.

Caffeine is a regular part of many individuals’ lives. But for some, it’s more of a hindrance than a help.

“Healthy individuals drinking two cups of coffee a day are generally OK in the sense that it’s not going to negatively affect most of your physiological functions,” Anisa Morava, one of the researchers who worked on the study, said in the press release. “However for special populations, caffeine consumption can be problematic and should be limited or reduced.”

People suffering from anxiety disorders or those who experience muscle tremors should be careful about their caffeine consumption, as well as those who are pregnant, the release says. Anyone with a high dependence on caffeine, who might be consuming more than four cups of coffee or energy drinks a day, should also think about cutting down on the habit.

The average person getting a latte at the start of the work day is not likely in need of a drastic change, but for those who are trying to wean themselves off of caffeine, it may be a welcome discovery that exercise can help both with caffeine withdrawal and with boosting some of the cognitive functions that caffeine helps with.

“If people experience withdrawal, an acute, brisk walk may reduce some of the symptoms,” Morava said. And if coffee doesn’t keep you awake the way it used to, it might be time to buy some comfy running shoes.