There was a time Jeff Samardzija and Andrew Cashner sat in the Wrigley Field bullpen together putting in their time as relievers while being considered the potential future front end of what's presently the best team in baseball's rotation.

They've since moved west and face off as starters for the first time Wednesday in San Francisco as the Giants try to complete a three-game sweep of the San Diego Padres.

Teammates in 2010-11 before Cashner was traded to San Diego, neither ended up seeing it through to the end of the Chicago Cubs' lengthy rebuilding phase. Rather than being a part of the 15-5 Cubs, they're on teams at or below .500, though they're both coming off arguably their best starts of the season.

More from FoxSports

Samardzija (2-1, 3.00 ERA) gave up a run and six hits in 7 2/3 innings in Friday's 8-1 win over Miami, his home debut for the Giants.

"It was great to come out here and throw well the first time out here in this stadium. It was an electric atmosphere," Samardzija said. "It's a very educated fan base with high standards, so you want to live up to those standards. When you come play at a park like this with the history they have here, as a new guy, you want to prove your worth and prove that you belong on this team. Hopefully they saw some things they like."

The right-hander is 2-0 with a 2.57 ERA in four appearances at AT&T Park and 3-1 with a 2.76 mark in six games against San Diego. Jon Jay is 8 for 18 against Samardzija, but former Chicago White Sox teammate Alexei Ramirez is 3 for 15.

Cashner (1-1, 4.29) has gradually gotten better in his four starts and earned his first win in Friday's 4-1 home victory over St. Louis. The right-hander allowed a run and three hits in six innings and impressed Cardinals manager Mike Matheny.

"He came at us and he used his other pitches more than just his fastball," Matheny said. "He was making pretty good pitches overall. We had to fight for any kind of rhythm at all."

The Giants have found that rhythm plenty against Cashner and particularly so at AT&T Park, where he's 0-4 with a 6.91 ERA in five starts and four relief efforts. Buster Posey (11 for 25 with two home runs) and Brandon Crawford (6 for 14 with a homer) have had the most success against him.

Tuesday's 1-0 win took very little offense with the Giants (11-11) managing four hits in Johnny Cueto's complete game. After being swept in four games at home by Arizona, they've won four of five with the rotation earning each decision with a 2.25 ERA.

The quiet offense Tuesday was an anomaly as Giants have won the last seven meetings with the Padres in San Francisco by scoring 7.43 runs per game and batting .328.

The Padres (7-14) have lost four straight and are averaging 2.67 runs over a 1-5 span.

"Everybody is frustrated after a game like that," manager Andy Green said. "... We have to find a way to scratch out a run."

Derek Norris is 1 for 16 in the last five games, though Wil Myers is batting .383 on an 11-game hitting streak since moving to the No. 2 spot in the order. He hit safely in a career-best 12 straight as a rookie in July 2013 with Tampa Bay.