D.C. Mayor Marion Barry, looking back on the first year of his third term, yesterday characterized 1987 as a successful one for his administration in the delivery of public services but warned of difficult financial times ahead for the city.

"In every aspect of city government, you find there have been improvements in service," Barry said, citing the summer youth jobs program, the city's comprehensive plan for the homeless and improved snow removal efforts.

But, he said at his monthly news conference, the city's economic picture looks bleak, with costs rising sharply in the public safety and personnel areas.

The mayor noted that while many cities are facing layoffs and tax increases to cope with the economy, he doesn't foresee any layoffs in the District. Barry stopped short of saying whether he plans to propose a tax increase.

A strong defender of the city's residency requirement, Barry yesterday expressed willingness to consider changes in the law, which he proposed 10 years ago. D.C. Council member Betty Anne Kane (D-At Large) released a report Monday urging that the District give preference to job applicants who live in the city rather than requiring them to reside in the city.

Barry's upbeat description of the past year, coming less than a week after City Administrator Thomas M. Downs announced he was leaving to take a post in New York City, contrasted with concerns expressed by administration officials and critics who say the Barry administration has been hard hit by federal investigations, news accounts about Barry's personal life and staff turnover.

"You are going to always have staff turnover," Barry said. "People get tired. They get better offers. We are not paying a lot of money here.

"We have had a very good year . . . . I don't think any other city has ever been investigated {as much as the District} in the history of America, yet we have come through it all with our heads high and our spirits high."

When a reporter asked if Barry felt any remorse about the sentencing last week of former mayoral aide Robert B. Robinson, who was convicted of taking money from a city fund to pay off the mayor's personal debt to a furrier, Barry said he only hoped that the judge's sentence would be a lesson to other city employes.

"As long as you have human beings, you are going to have someone who is going to misuse their position, going to misuse the public trust, do some deeds that I don't approve of," he said.

Robinson, who was placed on probation for one year, repaid the fund with his own money and Barry subsequently reimbursed Robinson.

The mayor's description of the city's financial picture was in response to a report issued this month by council member John A. Wilson (D-Ward 2). Wilson warned that heavy debt is eroding the city's financial base and urged that the city cut by one-third the fees paid to law firms and investment bankers who service the city's three-year-old bond program.

Wilson said yesterday he was pleased to see that the mayor has focused on the problem and added, "The question becomes now, what are we going to do about it? It's a question of making hard decisions."

On another matter, Barry said he is concerned about the increased violence associated with the drug trafficking in the city, noting that seven D.C. police officers have been shot in the last month.

"We have to figure out a way to get ahead of what's happening," he said.

Among the alternatives under consideration, Barry said, is equipping police officers with 9 mm semiautomatic pistols to replace the .38-caliber revolvers that D.C. officers now carry.

But, Barry said, "It's not clear yet whether automatic firepower is going to stop these crazy hoodlums from shooting people. What has happened is they have no regard for life."