The global economy ran into a few speed bumps over the last year, ranging from inflation concerns to supply chain trouble. As a result, the stock market stumbled. For example, the S&P 500 market index is down by 24% year to date, and the growth-oriented Nasdaq Composite index fell 32% over the same span.

But the falling tide didn't lower every boat. Many companies have managed to deliver stellar growth in this difficult year, and some of these star performances were impressive enough to generate positive stock returns, too.

On that note, let's take a look at two of the healthiest growth stocks in 2022. These stocks are winners in a difficult market environment and should be even bigger wealth-building champions when times are good again.

Paylocity: Building an empire of small business clients

Online payroll services expert Paylocity (PCTY -0.18%) is barely trading up in 2022. As of the closing bell on Friday, Oct. 7, Paylocity shares had gained 4.1% year to date.

Paylocity's business didn't just coast along in recent quarters. Instead, it soared. The company's revenue growth took a break in 2020 but roared back to life in 2021, and the 37% year-over-year sales growth Paylocity reported in the most recent quarterly report was the strongest growth spurt since 2017.

At the same time, Paylocity is generating solid cash flows and rising bottom-line earnings. It's been two years since this company delivered anything less than a double-digit percentage surprise in a quarterly report.

Chart showing Paylocity's revenue and free cash flow rising since early 2020.

PCTY Revenue (TTM) data by YCharts. TTM = trailing 12 months.

The company's cloud-based tools for payroll processing, time tracking, recruiting, and employee benefits are in high demand nowadays. Paylocity is particularly successful in the market for small and medium-sized businesses, giving it a domestic target market of more than 1.3 million companies with 73 million total employees. This market segment is booming, and Paylocity is stealing market share from larger rivals such as Paychex and Automatic Data Processing.

Chart showing Paylocity's revenue beating that of Paychex and Automatic Data Processing since 2018.

PCTY Revenue (TTM) data by YCharts. TTM = trailing 12 months.

This stock isn't cheap, trading at 152 times trailing earnings and 17 times sales. However, with Paylocity, you're paying a premium for a top-quality company on a firm growth trajectory in an exciting market. Paylocity's sales grew by a compound annual average of 23% in the last five years, and that growth rate is expected to stay in the 20% range for the next half-decade, too.

Harmonic: The media streaming expert you never heard of

Video-streaming technology expert Harmonic (HLIT -3.10%) is arguably an even more exciting growth stock than Paylocity.

Harmonic provides equipment and services that bring next-generation streaming media to consumers. The company doesn't compete with pure-play content platforms like Netflix (NFLX -9.09%), or with video-streaming portal providers such as Roku (ROKU -3.05%). Instead, you'll find Harmonic's solutions where the edges of traditional media overlap with the streaming market.

For example, Harmonic is a key technology provider for many services that stream live sports. Another area of focus is the TV everywhere sector, where broadcasters want to make their linear cable/satellite/broadcast content available online as well. Harmonic can help. Together, these two target sectors account for 90% of Harmonic's quarterly revenues.

If Netflix and Roku represent the first wave of the media streaming revolution, you could argue that companies like Harmonic stand in the vanguard of the second wave. Marrying live content with user-controlled digital streams can be tricky, but there is clearly a large hunger for this type of hybrid media.

So Harmonic is experiencing rampant growth in the Software-as-a-Service segment, with a compound annual growth rate (CAGR) of at least 45% over the next three years. In August's second-quarter report, top-line sales rose by 39% with stable profit margins and lots of client wins. The cable access business led the way with a 62% annualized revenue jump.

This is the media streaming growth stock you never knew you needed. The stock has gained 13% in 2022 and 52% over the last year, so there's market momentum behind Harmonic's ticker even in the current growth-stock lull.