Krispy Kreme Doughnuts (NYSE: KKD) cranked out another tasty earnings report today, showing a sugary profit of $0.17 per share for the fiscal third quarter. That's a nifty 55% increase over the year-ago period. When you mix in a 10.1% rise in same-store sales, it's clear the company has created a recipe for success.

While chewing on today's news, I was reminded of a story I wrote on Krispy Kreme 15 months ago. At the time, I was puzzled how a company whose future growth rate was so well known could carry such a high valuation (its trailing P/E ratio was over 100). Today, the stock is 20% higher and its P/E has drifted down to 68.

I compared the donut king with the auction king, eBay(Nasdaq: EBAY), saying I was able to justify the latter's valuation because it seemed to have many more growth options available to it. Let's look back over the 15 months since I wrote the story. The S&P 500 and Nasdaq indexes are down about 20%, while Krispy Kreme and eBay are up 20%. Yes, two of the stocks most criticized on a valuation basis have hammered the indexes over a period when the economy has taken down many a company. Why? Because their businesses have not faltered and they've consistently delivered on their promises.

True, they would be in for quite a fall if their earnings took a hit similar to the one so many tech companies absorbed over the past couple of years. Both are volatile and risky, and are not recommended for new or conservative investors. But the lesson here is that great long-term business performance can provide its own margin of safety.