The S&P 500 had its worst first half since 1970, and the Nasdaq Composite was down 28% at the end of June. But that didn't stop some of the wealthiest investors in the world from buying stocks in the second quarter.

Hedge fund manager Israel Englander of Millennium Management increased his stake in Tesla (TSLA 4.96%). And fellow fund manager David Shaw of D. E. Shaw & Company added to his position in Datadog (DDOG -1.43%). Both Englander and Shaw have a place on the Bloomberg Billionaires Index, so it's fair to assume they know how to build wealth.

Is it time to buy these growth stocks?

Tesla: An automaker with an ambitious vision

Electric car maker Tesla delivered strong financial results over the past year despite battling several headwinds, including the rising cost of materials, supply chain disruptions, and COVID-19 lockdowns in China. Revenue climbed 60% to $67.2 billion and free cash flow skyrocketed 165% to $6.9 billion, as Tesla posted an industry-leading operating margin of 16.2%.

Elon Musk has often said Tesla would be the best manufacturer in the world, and the company is making good on that promise. The driving forces behind its efficiency include a disruptive direct-to-consumer sales strategy, a sizable cost advantage in battery pack production, and innovations like single-piece casting.

Additionally, Gigafactory Shanghai has localized its business in China, reducing logistics costs because Tesla no longer needs to ship cars into the country. To that end, Tesla should become even more efficient as production continues to scale at Gigafactory Berlin, its first European production facility.

Looking ahead, investors have plenty to be excited about. Tesla expects to grow deliveries 50% per year over a multiyear horizon, and it will soon expand into new verticals of the auto industry. Tesla Semi deliveries will start this year, Cybertruck deliveries will start next year, and the company has a robotaxi slated for production in 2024.

The robotaxi is particularly noteworthy. The vehicle will be designed for full autonomy -- no steering wheel or pedals -- and it will help Tesla achieve its ambitious vision of launching an autonomous ride-hailing network. Notably, Tesla has more autonomous driving data than any other automaker, and that gives it an edge in the race to build a self-driving car. With that in mind, analysts at UBS Investment Bank value the robotaxi market at $2 trillion by 2030, and the electric vehicle market is expected to reach $1.2 trillion by 2027. That puts Tesla in front of a tremendous market opportunity.

Of course, the stock isn't cheap at 15.3 times sales, especially when most automakers have a price-to-sales ratio below 1. But Tesla could revolutionize the transportation industry in the years ahead, so risk-tolerant investors should seriously consider building a small position in this growth stock.

Datadog: The leader in application performance monitoring

Modern IT environments have become quite complex. Businesses depend on an ever-growing number of software and services, and those technologies are often spread across public clouds and private data centers. Datadog provides performance monitoring and security software that helps customers avoid downtime in business-critical applications, networks, and infrastructure.

Datadog offers more than a dozen software products and 500 pre-built integrations, allowing its platform to processes over 10 trillion events each day. Using those data points, Datadog leans on artificial intelligence (AI) to predict and identify performance issues, which accelerates time to detection and resolution for customers.

In June, research company Gartner once again recognized  Datadog as a leader in application performance monitoring and observability, citing its broad product portfolio and AI engine as key differentiators. Those assets have fueled a strong land-and-expand growth strategy. Datadog saw its customer base climb 29% over the past year, and its retention rate has exceeded 130% for 20 consecutive quarters, meaning the average spend per customer is rising more than 30% each year.

That has naturally translated into strong financial results. Revenue soared 79% to $1.4 billion over the past year, while free cash flow rocketed 168% to $354 million. Moreover, investors have good reason to believe that momentum will continue. Management puts its market opportunity at $53 billion in 2025, and consistent product innovation has kept Datadog on the leading edge of the observability market.

As a caveat, Datadog isn't exactly cheap at 24.8 times sales, but patient investors with a high risk tolerance should still consider buying the stock. As enterprises continue to invest in digital transformation, monitoring and security software will become increasingly critical, and Datadog is well positioned to benefit from that trend.