What makes HBO Max’s “Hacks” stand out from a slew of new TV offerings (and other shows about the same topic of stand-up comedy), isn’t just its stellar cast, it’s also the premise that two women share a connection, despite being worlds apart, through the desire of making others laugh. And in an even more special twist of fate, the actors also found a similar connection in how they drew from real-life comedians for their roles.

“I thought that it would be a blast to play a stand-up comedian,” Smart reveals to Variety. “I fantasized about that when I was 12; I wanted to be Phyllis Diller.” (In fact, she shares she dressed up as the colorful comedian for Halloween at that age.)

Set in Las Vegas, “Hacks” follows canceled comedian Ava (Hannah Einbinder) who begrudgingly heads to the Nevada to work with the only other person who will currently employ her, stand-up legend Deborah Vance (Smart). In an attempt to keep each other relevant, the duo agrees to work with each other, slowly bridging the generational divide with gags. They fire insult after insult at each other, stripping away their defenses by ripping each other, but eventually connecting over a mutual respect of the craft and the realities of “doing the work.”

Of real-life stand-up, Smart says she “never had the guts to try it.”

“When you’re doing comedy, it’s painfully obvious when you’re failing — that’s true when you’re doing a play too — but because you are not directly talking to the audience, you’re talking to other characters and there’s the fourth wall. You can just keep going and try to forget the fact that they aren’t really laughing,” she continues. “Standing up there all by yourself, facing your audience with a mic in your hand, it’s shockingly clear when you are not doing well. So, I didn’t ever want to put myself in that position.”

Draped in expensive silks and designer sunglasses, Smart’s character was inspired by the late greats of stand-up past including Paula Poundstone, Elayne Boosler and (of course) Joan Rivers.

“I really love Joan Rivers’ stuff,” says Smart. “People don’t realize how incredible she was. They think of her more when she’s on the red carpet and insulting people. And that’s not the way I think about it.”

As for Ava, Einbinder pulled inspiration from the “Saturday Night Live” and “Ben Stiller Show” comic Janeane Garofalo. “I also think that Ava’s an amalgam of the L.A. comedy scene that I know. There are mannerisms of hers that reflect, I would say the wave of that East Los Angeles comedy scene. She has a little bit of that, just because that’s where she’s from.”

Despite the generational gap, the commitment to being better, getting bigger laughs and making each other laugh links the comedians — but not without much hilarious pain and suffering first.

“Hacks” is streaming now on HBO Max.