They're two of the biggest pop stars in the world, racking up armfuls of awards and selling out arenas for the past decade. But the rumors of bad blood between Katy Perry and Taylor Swift are legendary. Their rivalry apparently took a new turn, with Swift announcing late last week that her music is back on Spotify at the exact moment Perry's new album, Witness, dropped. Coincidence? Hmm.

Over the weekend, Perry extended an olive branch to Swift. "I forgive her and I'm sorry for anything I ever did, and I hope the same from her," Perry said on the Thrive Global Podcast. And while we're all for their cold war to thaw, there's an argument to be made for keeping things chilly.

That's because recent research points to the surprising benefits of having a frenemy and how it can up your game. “Competition can help you identify personal mental strengths and become aware of how your own actions relate to positive outcomes, progression and success,” says sports psychologist Caroline Silby, Ph.D., who regularly works with Olympians and other elite athletes. Here's more on the upside of having a rival.

It enhances your motivation

Are you more liable to go to the gym if you have a supportive buddy there—or a competitive friend who makes it clear she's better than you? According to research from the University of Pennsylvania, competition is what keeps you showing up and acing your performance.

The study divided exercisers into two groups: one group was able to watch a scoreboard that ranked their workout class attendance, while the other group was asked to use online chat forums to encourage team members to work out—but they weren't tracked or ranked against one another. At the end of the experiment, class attendance rates were 90% higher among the competitive group.

“In a competitive setting, each person’s activity raises the bar for everyone else,” stated Damon Centola, Ph.D., associate professor at the University of Pennsylvania’s Annenberg School and the School of Engineering and Applied Sciences and senior author of the study. “Social support is the opposite: a ratcheting-down can happen. If people stop exercising, it gives permission for others to stop, too, and the whole thing can unravel fairly quickly.”

It makes you smarter and more creative

Competition doesn't just compel you to boost your physical performance; it forces you to focus on ways to improve in almost any situation, says Lori Scherwin, founder of career coaching firm Strategize That. This increases your cognitive skills and creativity. “You'll start thinking differently and expanding your imagination to do things better,” she says. Just ask anyone who’s ever stayed up all night perfecting a presentation and hopefully outshine a work rival . . . only to come up with a brilliant strategy and subsequently earn a reputation at the office for being an ideas person who pushes boundaries.

It helps you ID your strengths and weaknesses

When you’re trying to beat out a rival, you naturally take inventory of the habits and traits of yours that help you stand out, says Silby. That constant mental inventory in turn helps you identify areas where you excel and where you could use some improvement. “If you remember to keep yourself focused on doing your personal best, you'll stay focused on your own development and how you can grow and learn,” notes Scherwin.

It tightens your relationships

It might seem counterintuitive to see competition as a relationship builder. But whether it's on the job, at the gym, or among your social circle, to get things done, you need to team with others, says Scherwin. “Pushing yourself to succeed will naturally gear you toward enhanced collaboration and position you as a leader with whom others want to associate.”

And though it sounds strange, your relationship with your rival can change as well by becoming more respectful. Competition can make you angry and resentful, but ultimately it pushes you both to succeed—and earn props from the other.