The pair will line up for the Silverstone-based team again in 2018, despite a recent ban preventing them from racing one another after a series of clashes.
Mexican Perez told France's Auto Hebdo that he was "surprised" by the French youngster's "level of performance" in 2017.
"I did not think he would have such results in his first year," Perez, to contest his eighth consecutive F1 season next year, said.
"Even with a difficult car, Esteban still manages to go fast. That's one of his strengths and I have to learn from that.
"Recently, he has also managed to improve a lot in qualifying, but for me it's good to have a teammate to push me to my limits. Because in today's F1, your teammate is your only reference.
"The three teams in front of us are untouchable."
"If Sergio does not push his limits, Esteban will become the number one," the Mexican said.
"The internal competition is good for Sergio, but he absolutely must succeed because this business is unforgiving.
"Sometimes I wonder what Valtteri Bottas is doing at Mercedes, because he is clearly not at the same level as Hamilton. Especially when Esteban is also a Mercedes driver."
Perez and Ocon have 92 and 83 points respectively heading into this weekend's Brazilian Grand Prix.