Oblivious to antiapartheid demonstrations outside, Bob Hewitt and Frew McMillan gave their own demonstration of flawless doubles yesterday at Vandervbilt University's Memorial Gymnasium to keep South Africa afloat in the Davis Cup American Zone North Section finals.

Hewitt and McMillan, the reigning U.S. Open and Grand Prix Masters champions and arguably the best doubles team in tennis today, ravaged the top-ranked U.S. pair, Fred McNair of Chevy Chase, Md., and Sherwood Stewart, 6-0, 6-3, 6-4, to keep South Africa's slim hopes in the best-of-five-match series alive.

New Yorker Vitas Gerulaitis and Harold Solomon had given the United States a 2-0 lead Friday night. Gerulaitis overcame a nervous start to defeat Bernie Mitton, 2-6, 6-2, 6-1, 7-5, and Solomon wore down Byron Bertram in a bockcourt war of attrition, 4-6, 6-0, 6-3, 6-1.

Solomon plays Mitton, whom he has beaten twice in the last six months after two earlier losses, in the fourth singles today, Gerulaitis, one of the quickest world-class players, is paired against Bertram, one of the slowest.

About 2,000 demonstrators against South Africa racial policies had marched three miles from the Tennessee state capitol to the gym and joined hundreds more there for demonstrations outside the building and in nearby Centennial Park.

Civil rights leaders spoke against the repression and racial separation policies of the South Africa government.

Only 1,164 paying customers watched the doubles match and a later exhibition between Floridian Larry Gottfried, 19, and Peter Lamb, was the first nowhite named to the South African squad.

Uniformed police were again seated at the end of each aisle leading to the court, facing the stands, as part of the massive security precautions here. There were no incidents inside the gym, and the South Africans were enthusiastically applauded for their masterful play in the doubles.

Hewitt, 38, an Australian who emigrated to South Africa and married a Johannesburg woman in 1964 after being unable to crack the talent-laden Aussie Davis Cup team, showed little patience with reporters' questions about the political activity surrounding these matches.

"Are they keeping in step?" he snapped, when asked about the protest marchers.

Pressed as to whether he had thought about the demonstrations, he replied, "I've never thought about them in my whole life."

A newswoman, recalling that Gerulaitis had found it unsettling the previous night to be escorted to the gym by plainclothes policeman wearing bulletproof vests, asked Hewitt if he had been transported in a police car.

"I came in an armored tank," Hewitt said.

At this point McMillan, 35, a native-born South African who is married to an Englishwoman and travels on a British passport, intervened, apparently recognizing that his partner's seeming insensitivity was unbecoming.

"Perhaps we like to treat these things with levity, but obviously we have thought about them at length," he said. "We don't really know what's going on outside. Bob is not being flippant."

Promptly bombarded with another politically oriented question, Hewitt said: "I don't want to be rude, but I would rather answer questions about tennis. That's what we just did out there, funnily enough, was play tennis."

Undaunted, a reporter persisted: "Did you have any anxious moments out there on the court, worrying about people coming out of the stands and disrupting the match"

Hewitt shrugged. McMillan smiled at the ingenuity of the inquiry. Neither replied.

Thereafter they did talk about tennis. They have beaten McNair and Stewart in eight of nine career meetings, five in a row, and McMillan agreed, "This must rank as the most one-sided."

The South Africans' performance can only be described in superlatives. They gave a dazzling display of both the fundamentals and subtleties of doubles, keeping murderous pressure on McNair and Stewart with consistently outstanding service returns and net play.

Hewitt and McMillan lost only seven points on serve in the first two sets, 18 in 12 service games in all. They did not have a break point against them until McMillan saved two in the ninth game of the third set, while McNair and Stewart did not hold serve without a struggle until the fourth game of that set.

McMillan, a familiar if unorthodox figure in his white golf cap and two-fisted grip on both forehand and back-hand, was the best man of this heaven-made marriage yesterday, returning like a demon from the left (advantage) court, reacting to every shot with incomparable reflexes and anticipation, volleying spectacularly.

"We tried staying back, coming in, playing 'Australian' (net man on the same side of the court as the server), changing the speed, direction and placement of our serves," McNair said. "But for everything we did, they had an answer. That's why they are No. 1."

The Americans said they were unconcerned about the demonstrations and the security measures.

"The NAACP is a nonviolent organization. I think the people demonstrating here are basically intelligent people who didn't want violence. There were no hassles," Stewart said.

"I think the protesters have accomplished what they came here to do," McNair added. "They have made their point, peacefully and in good taste. Now I hope the U.S. Davis Cup team accomplishes what it came here to do."

Hewitt is as limited in singles by his slowness afoot as McMillan is by his restricted reach.

But in doubles, where they have to cover only half the court each, they are the best in the world. Hewitt's touch on ground strokes, volley and lob matches McMillan's magical quickness of hand. They both have vast resources of doubles sense and savvy; their teamwork, though usually unspoken, is faultless.

Yesterday they were at their best, particularly in the first set. After McNair had netted an easy overhead on the first point, the South Africans ripped three straight vicious returns to break at love. They won 15 of the first 16 points and never eased the ferocious pressure.

"Sometimes you feel like you're against a wall, and somebody's throwing darts at you and you're just trying to dodge them. That was us today. They dominated us from start to finish," said Stewart, 31, the amiable Texan who had one of his move trying days in the left court.

"I can't recall any match Sherwood and I have been involved in that we were struggling like that for the entirety," added McNair, 27, who staved off the inevitable with several sensational leaping smashes, springing like a jack-in-the-box to devour lobs, but couldn't quite ignite a full-scale resistance.