With the stock market sitting close to new highs amid rising inflation and tight supply chains, picking the right stocks is starting to feel like a chess match. Will this bull run continue? Is a market crash coming? Regardless of what happens in the near term, consistently adding money to strong companies has proven to be the most efficient way to grow your savings over the long term, regardless of the broader economy.

Whether you are looking for growth or dividends, here's why Shopify (NYSE:SHOP) and Texas Instruments (NASDAQ:TXN) are two good stocks to consider right now. Let's find out a bit more about them.

Two people at a small business who are packing an order for a customer.

Image source: Getty Images.

1. Shopify

Shopify has established itself as the default operating system for e-commerce. More than 1.7 million small businesses subscribe to Shopify's platform to set up an online storefront. But what makes Shopify such an attractive long-term investment is that it shares in merchants' success through processing payments and offering other merchant solutions like Shopify Shipping and Shopify Capital. 

Shopify has continued to hum along through the ups and downs of the pandemic. Revenue growth clocked in at 46% year over year in the third quarter, consistent with its pre-pandemic performance. Many e-commerce companies have not been able to maintain such strong momentum during the economic reopening, including Amazon, which posted a revenue growth rate of just 15% last quarter.   

Shopify is standing tall with plenty of growth opportunities still ahead. There are nearly 100 million micro-, small-, and medium-sized businesses worldwide, not counting large companies that continue to find value with Shopify's offering. It continues to roll out new services to pad the top line, including recently introducing Shopify Markets, which instantly connects small businesses with a global consumer base. 

The stock looks expensive as it sports a price-to-sales ratio of 49, but Shopify has tremendous room to expand in the multitrillion-dollar global commerce market, and it should emerge as a very profitable business from growing subscriptions and service fees. The stock should be a rewarding investment for decades to come.

A customer shopping consumer electronics in a store.

Image source: Getty Images.

2. Texas Instruments

It's understandable that some investors might balk at Shopify's high valuation, so here is a more moderately valued, dividend-paying tech stock that is also rock solid in the shareholder stewardship department.

Texas Instruments is a leading producer of analog and embedded processors found in numerous consumer electronics, vehicles, and other industrial applications. It's been around in some form since the Great Depression, so it has successfully navigated several economic cycles and continues to grow and deliver great returns for investors.

TI continues to improve its manufacturing process, recently migrating to a 300-millimeter chip wafer to lower costs and expand its profit margin, which management is good at. Management runs the company like long-term business owners, which seems like a lost art these days, but its focus on the big picture has delivered in spades.

Over the last four quarters, TI generated $7.1 billion in free cash flow on $17.6 billion in revenue. That's an impressive free cash flow margin of 40%. From 2004 through 2020, TI's free cash flow per share grew at an average annual rate of 12%. Growing this metric is management's priority over the long term and should keep the stock moving higher.

What's more, robust cash production has led to rising dividends to shareholders over the years, with the stock currently paying an above-average dividend yield of 2.2%. TI pays out roughly half of its free cash flow in dividends, yet still generates plenty of cash to invest in the future. 

The stock is reasonably priced at current levels, with a price-to-free cash flow ratio of 24. TI's growth may not keep pace with Shopify's, but it's one of the safest tech stocks you can own for the long term.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.