Smoking cannabis is as bad for your lungs as smoking cigarettes, says a Dunedin-based study.

"You can't say cannabis is safe any more than you can say tobacco is safe. The health message is clear - don't be burning vegetable matter and inhaling it," said Dunedin School of Medicine associate professor Robin Taylor, one of the study's authors.

Smoking both cannabis and tobacco narrowed people's airways even more than smoking only one of the substances.

The study involved examining how much breath about 900 people aged 18 to 26 could expel forcefully from their lungs.

People who smoked cannabis or tobacco expelled less air in a second than non-smokers and took longer to expel all the air from their lungs because their airways had narrowed slightly.

Airflows decreased even more when people smoked both cannabis and tobacco. Smokers' breathing and airways were affected by the tar in tobacco. Cannabis had similar levels.

The study group members were examined three times in eight years.

While all were healthy and differences in their airflows subtle, the figures highlighted a trend, Professor Taylor said.

The information was gathered as part of the Dunedin Multidisciplinary Health and Development Study and analysed by respiratory researchers.

The researchers' interest was sparked by cannabis use increasing significantly in most developed countries in the past three decades and people increasingly questioning if it was worse than smoking tobacco.

Professor Taylor said the study was complex because group members' lung development was at different stages.

Lungs grew and became more efficient during childhood and adolescence, then efficiency started naturally declining in the mid-20s.

The study would continue when the people were aged 32 to 37.