Cramer: How Yahoo competes with great tech companies

Cramer: Yahoo up against the greatest

Yahoo's Marissa Mayer faces an uphill battle in the tech wars against Google and Facebook, CNBC's Jim Cramer said Wednesday.

The search and content company must start investing in technology now, and in a big way, in order to catch up with the likes of Google, a company making wide inroads into everything from online advertising platforms to wearable technologies.

Yahoo's large stake in Chinese online shopping outlet, Alibaba, must surge in order for Yahoo to gain any sort of advantage, Cramer said, comparing Yahoo's competitors to the Allied Powers in World War II.

(

"If she weren't up against Google and Facebook a lot of this would be a lot easier," Cramer said on "Squawk on the Street." "They are really formidable. They're like the United States and Britain in the West in 1943—don't mess with us. ... I don't want to relate politically to who they are, but I'm just saying she's up against two of the great arsenals of democracy."

Marissa Mayer
Getty Images

It seems like Yahoo "starved" its tech innovation during the past few years, Cramer said. Instead, the company's content outlets have poured resources toward headline-grabbing hires, he said.

"These are technology companies," Cramer. "They're not content companies. Yes, Katie Couric, that's a terrific get. Yes, David Pogue, terrific get. The amount of money they have to spend on tech to catch up to Facebook and Google is monumental. Alibaba really has to go up for the honeymoon to continue."

(Read more: The incredible shrinking Yahoo, but more showbiz)

Yahoo shares fell Wednesday morning in light of declining ad revenue and slower growth at Alibaba. Many analysts feel Alibaba represents an outsized portion of Yahoo's stock price, which doubled over the past year. (Click here to get the lastest quote for Yahoo.)

Disclosure: Cramer's charitable trust owns shares of Google.

—By CNBC's Jeff Morganteen. Follow him on Twitter at @jmorganteen and get the latest stories from "Squawk on the Street."