Many tech stocks have taken it on the chin recently as investors have started to worry about how rising inflation and a looming recession will impact these businesses. As a result, shares of some tech names are down 30%, 40%, and even 50% year-to-date.

Nvidia (NVDA 0.28%) and Snowflake (SNOW -1.36%) are no exceptions, with the companies down 53% and 49% year-to-date, respectively. That said, only Nvidia has gotten pressured by the macroeconomic headwinds that investors are worried about, while Snowflake's business has remained relatively stable. So does that mean Snowflake is the more appealing tech stock to own right now? Let's find out.

Person looking out a window, wondering.

Image source: Getty Images.

1. Nvidia

This semiconductor company stumbled in its second fiscal quarter (which ended July 31, 2022). Nvidia saw decreasing consumer demand for its gaming graphic processing units (GPUs), which caused the chip maker's gaming revenue to drop 33% year-over-year to $2.04 billion. Considering that Nvidia's gaming business is its second-largest segment, this took a toll on overall revenue: Total revenue rose only 3% versus the year-ago period, which is much slower than Q1's year-over-year expansion rate of 46%.

That said, Nvidia continues to dominate the chip space. It leads the gaming industry, with some estimates putting Nvidia's discrete GPU market share at 75% in Q1 2022. It also rules the data center market, with 72% of the world's 500 fastest supercomputers powered by Nvidia.

Importantly, Nvidia is executing where its long-term opportunity lies. Nvidia sees a $1 trillion market ahead of it, and the gaming space only represents 10% of it. On the flip side, the data center chips & systems and automotive segments represent 60% of it, and the company is thriving on those fronts. Data center revenue in Q2 jumped 61% year-over-year to $3.8 billion, while automotive revenue increased 45% over the same period to $220 million.

While down versus the year-ago period, the company is also generating profits to capitalize on these prospects. The company generated almost $1.3 billion in non-GAAP net income and $837 million in free cash flow during fiscal Q2. Therefore, while the company might be seeing some short-term pressure, it is still gushing cash, which it can use to fuel its long-term potential.

There are two main lowlights for Nvidia. The first is that the stock is not cheap at 46 times earnings and 12 times sales -- valuations much higher than those of rivals like Advanced Micro Devices (NASDAQ: AMD). The second is that competitors like AMD aren't experiencing this softening demand: In its second quarter, AMD saw revenue jump 70%, while gaming revenue rose 32% on a year-over-year basis.

2. Snowflake

On the other hand, Snowflake continued to see rapid adoption in its fiscal second quarter, which ended July 31, 2022. The company provides cloud data storage capabilities and allows businesses to gather and seamlessly analyze data. This is a service businesses need all the time -- even during a challenging economic environment. Therefore, the company saw revenue skyrocket 83% year-over-year in Q2 to $497 million.

Snowflake has also executed on its land-and-expand growth strategy. Once it gets customers to use its services, customers begin to rely on Snowflake more and more. This is shown through the company's net retention rate of 171% in Q2.

The two primary concerns with Snowflake are its unprofitability and its valuation. Not only is the company unprofitable, but its net loss margin topped 45% in Q2. While this has been declining as a percentage of revenue, it still represents an enormous net loss. That said, Snowflake is generating cash -- the company's free cash flow reached $54 million in Q2 -- and it has a sturdy balance sheet with almost $4 billion in cash and investments sitting in the bank to fuel this loss.

Its valuation is the other concern. Shares currently trade at 33 times sales, which is an egregious price for any tech stock.

The better buy?

While both companies have great products, Nvidia looks like the better buy, despite its short-term headwinds. Yes, Nvidia is facing some tough competition, but the company is performing in the business segments that matter most. 

Snowflake's valuation is extremely high, meaning shares are priced for perfection over the coming years. For Snowflake to generate outstanding returns, the company would likely have to crush expectations, which could be hard to do. Its unprofitability could also take a toll on innovation in the future. Conversely, Nvidia continues to gush cash, allowing it to continue investing heavily to increase its dominance over the long haul. While both companies look appealing, if I had to choose one stock, I would pick Nvidia.