For some people’s diets, ice cream is … a good thing?

Dieting is always unpleasant. Who wants to ditch the cookie or forgo the pizza slice? But what if the cookie isn’t all that bad for you? What’s if it’s not bad at all?

That’s the premise of an Israel-based study that represents the largest single investigation to-date into how different people respond to identical meals. The study, published Thursday in the journal Cell, suggests that a cookie might actually be beneficial to some folks, as it relates to their personal metabolism — how their bodies convert food into energy. The team argues the key to a successful diet and reaching health goals may lie in personalized nutrition. And they’ve designed an app to help people keep track.

Researchers studied the metabolic responses of 800 people by measuring their blood sugar following a carb-heavy meal. Why blood sugar? Well, the carbohydrates from the food you eat are broken down into simple sugars, which are then absorbed into your intestines and through your bloodstream. High sugar levels have been associated with type 2 diabetes, heart disease, stroke and weight gain.

RECIPE: Here’s how you make Thanksgiving dinner in one pan

“Blood glucose levels are a major contributor to these epidemics,” said Eran Segal, a computational biologist from the Weizmann Institute of Science in Israel, who co-led the study. “Normalizing blood glucose can have highly beneficial effects on the health of individuals.”

Segal along with Weizmann immunologist Eran Elinav examined the factors that affect blood glucose levels, such as the nutritional content of meals, as well as a person’s lifestyle, medical state and the gut microbiome — the billions of bacteria living in our gut.

Eight hundred volunteers were directed to eat a specific breakfast diet for one week that consisted of plain bread on two days, bread and butter on two days and glucose and fructose mixed with water on the final three days. They were given no other dietary restrictions. Each breakfast contained 1.7 ounces of carbohydrates. That’s important because prior research had looked at how individuals respond to identical meals, but those studies worked on a relatively small scale — 10 to 20 people — and only examined one to three food items.

Segal, Elinav and their colleagues collected data from health questionnaires, body measurements, blood tests and stool samples. The volunteers used a mobile app, created specifically for this study, to log variables like meals, sleep times, exercises, medication use and hunger levels. Blood glucose levels were measured using a glucometer, a device that has a sensor with a thin flexible probe that is inserted under the skin.

Using this data, the scientists created a computer algorithm that successfully predicted the blood sugar response of the participants.

Key features of the smartphone-adjusted website that we developed for meal logging and daily activity collection. Photo by Zeevi et al., 2015, Cell.

Key features of the smartphone-adjusted website that we developed for meal logging and daily activity collection. Photo by Zeevi et al., 2015, Cell.

The same algorithm also predicted the sugar responses for another independent batch of 100 new subjects. The team then used the app to create custom diets for a second batch of 26 subjects. Those diets resulted in blood glucose levels that more than doubled and also seemed tweak the subjects’ gut microbiome. This finding supports the concept that gut microbes play a role in how we respond to foods.

The study reinforced something that doctors and dietitians have suspected for a long time: We all respond differently to different foods.

“We had already made the assumption many years ago that human genetic variation accounts for differences in our metabolism, in our physiology and the way we respond to environments,” said Dr. Raymond Rodriguez of University of California at Davis, who wasn’t involved in the study. “ This paper is a step forward in terms of validating that people will respond differently and you can quantitatively measure it.”

Researchers say the same algorithm could be used to construct diets to effectively lower blood glucose levels in healthy people. In future studies, they plan to test the app with non-Western diets and those who have metabolic disorders, such as diabetes.

Both Rodriguez and Segal said that there has been a tendency to put everyone under the same nutritional umbrella. People are often given generic diet recommendations: fewer fatty foods, less red meat and more fruits and vegetables – all recommendations that everyone and their grandmother would have given you. However, times are changing.

“Our study demonstrates that a multitude of different factors affect our responses to food and that personalized nutritional strategies would therefore be much more effective than general dietary recommendations,” said Segal. “We believe that with the recent technological advances, the time is now ripe for … improving the way we design and prescribe dietary interventions.”