Growth stocks tend to outperform during bull markets like the one that investors have experienced in the past year. The Nasdaq Composite, home to many of these stocks, is up a blazing 34% in 12 months, while the more diverse S&P 500 has gained 23%.

Yet the opportunity for generating huge returns with these stocks is even larger over the long term. That's because gains can compound over many years -- assuming a company can boost its sales footprint even as it steadily increases its earnings power.

Let's look at two stellar companies that seem primed to achieve this lucrative goal.

1. Buy McDonald's for profitability

Forever is a long time to consider holding a stock. On the other hand, McDonald's (MCD -0.91%) has been a dominant business for a long time. The fast-food giant's popular menu items, from the Big Mac to the relatively new McChicken platform, have kept consumers coming back for decades.

Mickey D's has had no trouble converting the popularity of those sandwiches into sales growth and rising profit margins. Comparable-store sales in 2023 increased 9% and operating income jumped 16% after adjusting for currency exchange rate swings. The company has a good shot at moving its already industry-leading profit margin toward 50% of sales in 2024 and beyond.

It hasn't all been good news for McDonald's in recent quarters, of course. Customer traffic dipped into negative territory in late 2023 as shoppers became more cautious in response to rising prices. Investors will want to watch that metric this year for a better balance between higher average spending and increased guest counts.

In the meantime, consider taking advantage of short-term pessimism on Wall Street to pick up a cheaper stock. McDonald's is valued at 8 times sales today, down from more than 9 times sales at several other points in the past year. That's a tasty discount for a blue chip giant like McDonald's.

2. Buy Lululemon for strong gross margin

Lululemon Athletica (LULU 1.31%) has all the ingredients that investors prize when they're searching for stellar growth stocks. The sports apparel specialist is winning market share in a huge industry while pushing into new markets, for one. Sales last quarter were up 19% compared to Nike's flat result. Lululemon achieved some of its best growth in areas outside of its core North American division and in new demographics like men's and kids' wear.

The chain is boosting sales via its online platform and with help from the launch of several new locations. Shoppers are increasingly frequenting existing stores, too, with comparable-store sales up 14% in the Q3 period (running through late October).

The best reason to like this growth stock might be Lululemon's opportunity to extend its profit margin lead over the competition in the next few years. Gross profit margin jumped to 58% of sales this past quarter even while many consumers were looking to save cash by scaling back on spending.

Nike, in contrast, converts less than 45% of sales into gross profit. The footwear and apparel giant recently lowered expectations for its 2024 operating trends while Lululemon boosted its outlook.

"We are pleased with our performance during the holiday season," CFO Meghan Frank said in a mid-quarter update.

The stock is still valued at a premium, even though shares have come down from their late-2023 highs. But growth stock investors can minimize the impact of that elevated price by extending their holding period into years and -- ideally -- decades.