It isn't unusual for a stock's price to double after a few years. However, many tech stocks doubled, tripled, or even quadrupled their value in 2020 as the pandemic turned the sector into a safe haven for growth-oriented investors.

Tech stocks were naturally insulated from the worst effects of the pandemic and other macro headwinds, while stay-at-home measures lifted PC sales, online shopping, and the usage of cloud-based software. Let's take a look at three tech stocks that rode those tailwinds and doubled in value last year: Advanced Micro Devices (AMD -1.96%), Datadog (DDOG 3.25%), and JD.com (JD 2.12%).

1. Advanced Micro Devices

AMD, the world's second-largest producer of x86 CPU and discrete GPU computer chips, saw its stock double in value in 2020. Sales of its Ryzen CPUs surged as rival Intel (INTC 0.58%) struggled with chip manufacturing shortages and delays, while stay-at-home measures sparked increased sales of its chips for new PCs.

A happy couple is showered with cash.

Image source: Getty Images.

AMD didn't suffer the same setbacks as Intel because it doesn't manufacture its own chips like its larger rival. Instead, AMD outsources the production of its chips to big foundries like Taiwan Semiconductor Manufacturing.

AMD is also led by a seasoned engineer, Dr. Lisa Su, while Intel has been led by Bob Swan, the former CFO who took the helm two years ago. Under Su, AMD launched new CPUs and GPUs that offered comparable performance to Intel's and NVIDIA's chips but at lower prices. Under Swan, who recently resigned under pressure from an activist investor, Intel mainly focused on cutting costs and repurchasing shares. As a result, Intel's stock declined 17% last year as the bulls rushed to AMD.

AMD could continue to outperform Intel this year if demand for its CPUs and GPUs remain elevated. Robust sales of Sony's PS5 and Microsoft's Xbox Series X and S gaming consoles, which AMD supplies chips for, could amplify those gains. Analysts expect AMD's revenue and earnings to rise 27% and 47%, respectively, next year -- which arguably justifies its forward P/E ratio of 52.

2. Datadog

Share prices of Datadog surged 160% last year as its data monitoring platform locked in more customers. Datadog pulls all of a company's data from different computing platforms -- including servers, databases, and apps -- onto unified dashboards for developers and IT professionals.

Datadog's silo-busting approach helps companies streamline their businesses and cut costs. More than 400 platforms, including big cloud platforms like Microsoft's Azure and Amazon Web Services (AWS), can be integrated with its dashboards.

An IT professional checks a server.

Image source: Getty Images.

Datadog deploys a "land and expand" model, in which it signs a customer to one service to cross-sell additional services, to grow its revenue. It's an effective strategy -- 20% of its customers were using four or more products last quarter, up from just 7% a year ago, and its net retention rate (which measures its revenue growth per existing customer) surpassed 130% over the past few quarters.

Datadog has had a great run, but its revenue growth is decelerating. It expects its revenue to rise 62%-63% this year, compared to 83% growth last year, and analysts anticipate just 36% growth next year. That slowdown, along with competition from similar platforms like Splunk and New Relic, could limit the stock's gains next year -- since it already trades at 40 times next year's sales.

3. JD.com

Shares of JD, the largest direct retailer in China, surged 150% last year as its growth in annual active customers accelerated, its margins expanded, and its profits soared.

Unlike Alibaba (BABA 2.12%), which runs paid listing platforms but doesn't take on inventories, JD takes on inventories and fulfills its orders through its first-party logistics network. JD's business model is more capital-intensive than Alibaba's, but it's better shielded from fraud and counterfeit products.

JD significantly expanded its reach into China's lower-tier cities, which accounted for about 80% of its new shoppers last quarter, to widen its moat against Pinduoduo in the lower-end market. Sales of grocery items, healthcare products, consumer electronics, and home appliances also remained robust on its core marketplace website.

That momentum could continue next year, and JD could profit from Alibaba's recent antitrust troubles as regulators take drastic steps to loosen Alibaba's grip on China's e-commerce market. JD should remain well-insulated from antitrust threats since its ecosystem is much narrower than Alibaba's.

Analysts expect JD's revenue and earnings to rise 23% and 40%, respectively, next year -- which are high growth rates for a stock that trades at 40 times forward earnings and less than one times next year's sales.