International Business Machines (IBM -0.35%) pulled off a cloud coup with its acquisition of Red Hat in 2018, a merger that the tech giant hopes will solidify its role in the open software market. McDonald's (MCD -0.84%), for its part, is reaching for tech dominance in the fast-food sector, but which company has the most room for growth?

The case for IBM

IBM is on cloud nine. Its stock price steadily rose from $110 at the end of December 2018 to a current price of $144 in mid-September 2019. The company has outperformed the S&P 500 and other cloud companies such as Salesforce and Amazon. But will the surge continue?

The acquisition of Red Hat in 2018 for approximately $34 billion was a stroke of genius by IBM. Red Hat is a leading software company that assembles open-source components for the Linux operating system. Open-source software is popular among users who want control over their software and would rather not pay rents or fees to closed-source software vendors such as Microsoft, Oracle, and SAP.

IBM used a third of its market cap on Red Hat, but the return on IBM stock since has been around 25%. IBM expects Red Hat to boost its revenue growth to the mid-single digits by 2020 to 2021. IBM is in a position to dominate the cloud space and to make inroads in China by doing so, as IBM's open-source offerings hold massive appeal to the Chinese. Companies like Huawei could use IBM architecture to build new 5G infrastructure, network switches, and Internet of Things components.

IBM is fighting on other fronts also -- cybercrime and high-powered mainframes. On Sept. 16, Los Angeles Mayor Eric Garcetti announced a new partnership to fight cybercrime with IBM Security at the LA Cyber Lab Security Summit 2019. This could be the first of many such partnerships between U.S. cities and IBM. Finally, also in September, IBM revealed its new z15 mainframe computer, a behemoth that can process up to 1 trillion secure web transactions a day for clients who use high-powered mainframes, such as airlines and financial services.

The case for McDonald's

Technology is a focal point for McDonald's, to whom 2019 has also been kind. Its stock price has steadily risen from around $158 in mid-September 2018 to $210 in September 2019.

McDonald's artificial intelligence Apprente acquisition is advancing its drive-thru technology and is its third tech acquisition after Dynamic Yield and a 10% stake in mobile app developer Plexure.

McDonald's is adding mobile pay and pickup, experimenting with AI for application to cooking processes, and rapidly adding self-ordering kiosks. Self-ordering offers huge economies because it eliminates mistakes, encourages upselling, doesn't require an hourly wage. Moreover, McDonald's has created a McD Tech Lab in Silicon Valley, where technology teams will further perfect the art of fast-food delivery.

Second-quarter earnings for McDonald's showed that global sales were their highest in seven years and comparable-store sales were at a four-year peak. The company returned $2 billion to shareholders through share repurchases and dividends.

Better buy

So, which of these high-fliers is the best pick? Two factors are pertinent from my perspective: price-to-earnings-growth (PEG) ratio and strategy.

IBM currently has a PEG ratio of 2.10 compared to an industry ratio of 2.24. Ideally, a company's P/E and expected growth should be equal; that is, an ideal PEG ratio is 1. Also, the higher the PEG ratio, the more likely the stock is to be overvalued. IBM could be overvalued, but it is in a better position than industry competitors. McDonald's has a PEG ratio of 3.18 compared to its industry PEG ratio of 2.25. It could also be overvalued, and is more likely to be, compared to IBM.

Strategy wise, IBM's lead-up to its open-source and cloud computing offensive is interesting. The company announced a $4 billion stock buyback in 2018, adding to about $1.4 billion remaining from a previous share buyback plan. IBM considered its stock undervalued at that point. The buybacks were then halted for 2020 and 2021 to allow for the acquisition of Red Hat.

IBM wins here because it is poised for growth in the open-source space, particularly in China, and I'm not convinced that McDonald's growth is set for liftoff in quite the same way. After all, McDonald's is not the only contender chasing a faster and more seamless customer experience through technology. My advice, then, is to bypass the golden arches and head for the cloud.