If you want to compare apples to apples in the oil industry, you can't do much better than looking at Devon Energy (DVN -0.98%) and Apache Corporation (APA -0.74%). The companies have nearly identical market caps and annual revenues, they've both recently made big asset sales, and both have been hit hard over the past year by the continued weakness in the oil markets. Apache's shares are down about 27%, and Devon's are down nearly 31%.

There's more to the story, though, for these beaten-down oil drillers. Let's compare their recent performances and outlooks to see which is looking like a top prospect for industry investors right now.

Oil pumps in silhouette against colorful sky at sunset

Both Devon Energy and Apache Corporation are top prospects for outperformance in the oil and gas industry. Image source: Getty Images.

Recent performance

Like all oil and gas exploration and production companies, Apache and Devon have been hit hard by the downturn in oil prices that began in 2014. Over the past three years, the companies' stocks have lost approximately 60% of their value and were posting some dismal quarterly numbers to boot.

Lately, however, things have been looking up -- way up -- for Devon. In Q1 2017, the company crushed earnings expectations as its high-margin U.S. shale oil plays, particularly in the STACK play in Oklahoma, boosted total revenue by 59% year over year. Q2 was likewise impressive, as oil output continued to increase, led by STACK, and the company churned out $250 million in free cash flow. 

Compared to Devon's best-in-class performance, Apache's recent quarters haven't been anything to write home about. While the company is executing as it has predicted -- and even outperformed its production guidance in Q2 -- it did post an adjusted quarterly loss in Q2. Production has declined, but more on that later. In any case, Apache's recent performance pales in comparison to Devon's.

Winner: Devon

Outlook

Of course, Apache's management had been predicting lackluster quarters to begin 2017. The company's much-heralded Alpine High find in West Texas was in need of critical infrastructure, which takes time to build. Its North Sea operations had to be suspended for planned maintenance and the installation of a subsea tieback to its Callater discovery.

In the third quarter, though, Apache is predicting that oil and gas from Alpine High -- and there's a lot of it -- will begin flowing in earnest. The North Sea tieback was successfully completed in Q2, and oil and gas is now flowing there as well. In addition, the company sold off all of its underperforming Canadian assets to achieve a better (and more profitable) product mix. All this is expected to help improve the company's bottom line and improve production for the next several quarters. So much so, that by Q4 2018, the company is anticipating adjusted production of between 435,000 and 487,000 barrels per day, up from just 337,000 barrels per day in Q2 2017.

Devon has only provided guidance through the end of 2017 but is predicting improvements in its production volumes as well. After selling off some underperforming assets, the company expects 18% to 23% growth in its year-over-year U.S. oil production, which is the primary driver of its production growth and profitability.

This one's tough to call because both companies have strong outlooks, but one thing is tipping the balance toward Apache: Hurricane Harvey. Yes, Apache's Houston corporate offices have been affected by the storm, but the company has no operations in the southern Eagle Ford shale, which has been affected. 

Devon, on the other hand, has significant Eagle Ford operations, accounting for 12% of the company's oil production. But as of Aug. 31, the company had not yet put out a press release about the storm's impact on its Eagle Ford operations. Peers like ConocoPhillips, though, are reporting curtailed production from the region. That tips the balance -- very slightly -- in Apache's favor.

Winner: Apache

Dividend

Of course, with oil prices in a prolonged slump, a robust dividend can be a major factor in selecting a company to buy. A better dividend gives investors an incentive to buy the stock now and be patient as they wait for an eventual price recovery. 

While Apache and Devon are very similar in many ways, their respective dividend yields aren't one of them...not currently, anyway. For years, the companies had -- surprise, surprise -- very similar payouts. In 2015, Apache was paying a quarterly dividend of $0.25 per share while Devon was paying a nearly identical $0.24 per share.

But that all changed in 2016, when Devon cut its dividend to $0.06/share, for a current yield of only about 0.8%. Apache, on the other hand, has managed to weather the weak energy market without cutting its quarterly dividend, which still stands at $0.25 per share, for a nice yield of about 2.6%. 

There's no contest here.

Winner: Apache

And the winner is...

This is a tough call, because both companies are underappreciated by the market right now, yet seem to have strong outlooks moving forward, even in a low-price environment. Both stocks look like bargains, and investors could be pretty confident adding either one -- or both -- to their portfolios. 

But since we don't know exactly when -- or if -- a recovery will happen, Apache's robust dividend yield tips the balance in its favor. Apache looks like the better buy today.