The stock market has been hammered this year. The tech-heavy Nasdaq Composite has now posted three consecutive quarterly losses, its longest losing streak since 2009, and the index currently sits 30% off its November 2021 peak. That puts the Nasdaq Composite deep in bear market territory.

But the ongoing market crash comes with a silver lining. High-quality stocks like Atlassian (TEAM -2.17%) and Zscaler (ZS 0.09%) are trading at a big discount to past valuations, creating a buying opportunity for long-term investors.

Here's why these growth stocks could make patient investors richer in the long run.

1. Atlassian: A key player in workflow management software

Atlassian specializes in workflow management software. Its products help businesses plan, organize, and collaborate on projects more effectively. The company benefits from a unique go-to-market strategy. It primarily engages customers online without a direct sales team. That keeps marketing costs low, allowing the company to spend more on research and development than its peers.

That advantage has empowered Atlassian to build an expansive portfolio of deeply integrated software, and its two most popular tools -- Jira for planning and product management, and Confluence for content creation and sharing -- both enjoy a leadership position in their respective end markets, according to G2 Grid, a website with reviews of business software and services.

Financially, Atlassian continued to grow at a steady clip over the past year. Its customer count climbed 18%, and the average cloud customer (it recently stopped selling perpetual licenses for on-premise products in an effort to drive cloud subscriptions) spent 30% more. In turn, revenue increased 34% to $2.8 billion, and cash from operations increased 5% to $884 million.

The future looks bright for Atlassian. It provides mission-critical tools that help customers work more efficiently and productively. That value proposition is relevant to more than 2 million companies around the world. With that in mind, management values its addressable market at $29 billion, and that figure is expanding by double digits, meaning the company has a long runway for growth.

Currently, shares trade at 21.4 times sales, a discount compared to the three-year average of 29.3 times sales. That creates a buying opportunity for investors.

2. Zscaler: A cybersecurity leader

Zscaler is the gold standard in network security. Its zero-trust platform -- known as a secure access service edge (SASE) -- leans on artificial intelligence (AI) to inspect network traffic and enforce security policies in the cloud, eliminating the cost and complexity that comes with managing on-premise security appliances like web gateways.

In terms of differentiating qualities, Zscaler operates the largest network security cloud in the world. Its infrastructure spans 150 data centers, and its platform inspects 250 billion requests each day, collecting 300 trillion security signals in the process.

That scale is a significant advantage, as each data point makes its AI engine more effective, allowing Zscaler to deliver better threat protection than other vendors. As proof of its best-in-class status, research company Gartner has recognized Zscaler as a market leader for 11 consecutive years.

Zscaler's customer count increased 20% to 6,700 over the past year, and the average customer increased spending by more than 25%, evidence of the growing momentum behind adjacent solutions like cloud-workload protection and digital-experience monitoring. In turn, revenue soared 62% to $1.1 billion over the past year, and free cash flow climbed 61% to $231 million.

Zscaler should continue to benefit from the adoption of software as a service and other forms of cloud computing. As enterprise data and applications become more widely distributed, SASE platforms become more necessary, because they allow users to quickly and securely access corporate resources from any device or location. In fact, Gartner believes that 80% of enterprises will have adopted SASE architecture by 2025, up from 20% in 2021.

Currently, Zscaler puts its total addressable market at $72 billion, but management sees room to increase that figure by targeting commercial organizations, business-to-business use cases, and Internet of Things workloads.

With that in mind, shares look particularly attractive at their present valuation of 22.8 times sales, a significant discount to the three-year average of 37.2 times sales. And given Zscaler's gold-standard status and massive market opportunity, this growth stock looks like a smart buy for long-term investors.