The study, done in conjunction with brain scans, was small, consisting of 35 chronic marijuana smokers who were 22 years old on average. Twenty had started smoking marijuana regularly before age 16, while 15 started smoking regularly at age 16 or later. All had similar levels of education and income.

The subjects were asked to complete an assessment of executive function  the brain processes responsible for planning and abstract thinking, as well as understanding rules and inhibiting inappropriate actions. The test  in which participants were asked to sort cards with different shapes, numbers and colors  is a measure of cognitive flexibility, the ability to stay focused, stick to rules and control impulsive responses. The participants who started smoking marijuana at younger ages scored significantly lower on the test than those who started smoking later in their teen years, Dr. Gruber said. They got fewer of the card-sorting categories correct and made more mistakes. They were also much more likely to repeat their mistakes, continuing to give incorrect answers even after being told that they were wrong.

At 15, Dr. Gruber said, the brain is still changing, and “the part that modulates executive function is the last part to develop.”

There were other significant differences between the two groups of smokers. Those who had been using marijuana regularly in their early teens smoked more than twice as often as those who started smoking later. The early users also smoked 14.7 grams per week, almost three times as much as the later smokers, who used 5.9 grams a week on average, Dr. Gruber said.

She nevertheless attributed poor performance on the task to early use of marijuana, not to the greater quantity smoked. The drive to legalize marijuana in many states should include age restrictions, she added.