Best Buy, a company that looked last year like it was headed the way of the Caribbean ground sloth thanks to being battered at the hands of online retailers like Amazon, announced $266 million in second quarter earnings Tuesday, up from $12 million a year earlier — and many, many times Wall Street's expectations of $39.4 million.

Best Buy's shares shot up 13 percent in the hours following the news.

The latest figures follow a set of changes put in place by CEO Hubert Joly, a comeback expert the company hired during some of the darker days of its decline in 2012. This year, Joly has unrolled a handful of new strategies, like promising to match prices with 19 online competitors and local stores, opening more branded in-store boutiques for manufacturers like Samsung and Apple, and recharging Best Buy's effort to boost online sales.

Joly has also slashed $65 million in annualized costs since May — yet another step in an ax-happy program that has already chopped $390 million, and aims for $725 million. Joly also sold the company's 50 percent share of Best Buy Europe for $526 million.

But cutting your way to profits only works for so long. "At this point," says Megan McArdle at Bloomberg, "Joly is simply better managing the decline" than his predecessors were. She goes on:

Same-store sales fell by 0.6 percent, and overall revenue was down 0.4 percent. This despite aggressive price moves by Joly, who set up a permanent price-matching policy in an attempt to win back sales from Amazon. The company expanded its profits by cutting costs. And in the long term, I just don’t see how Best Buy can cut costs enough to stay competitive with Amazon. [Bloomberg]

But Best Buy's core business is getting better, says Will Ashworth at Investor Place. For one thing, online sales increased 10.5 percent from the same time period last year.

"[Y]ou have to admit that Joly has done everything possible to get the company moving in the right direction," he says. "If it continues to extract savings from its operations while delivering a much better customer experience in-store and online, shareholders can keep expecting good things."