The Deuce,” the HBO drama from “The Wire” and “Treme” vets George Pelecanos and David Simon, transports viewers back to Times Square in all its grungy, seedy, early 1970s glory.

The show toplined by Maggie Gyllenhaal and James Franco revolves around a colorful clutch of hookers, pimps, bartenders, cops and sundry hustlers trying to make a living on the trash-ridden streets of New York. “Deuce” ultimately explores the growth of the modern pornography industry (although the first episode does not delve into the X-rated film biz). The premiere screening of “Deuce’s” pilot was the kickoff event for the Split Screens Festival, which runs through June 8 at IFC Center.

Here are 10 things we learned from the screening and Q&A with Gyllenhaal and director Michelle MacLaren, moderated by festival programming director Matt Zoller Seitz.

1. Prostitution is a lot like acting. Gyllenhaal plays a streetwalker named Candy who dons a curly blonde wig when she plies her trade. Outside of the job, she’s a brown-haired woman named Eileen with a young son. “All the sex you see her have — it’s a performance,” Gyllenhaal said. That fact is driven home by a scene in a later episode in which Eileen explores her genuine desire. “It brings into relief all of a sudden how much the rest of it was a performance,” she said.

2. MacLaren is known for her work on “Breaking Bad,” “Game of Thrones” and “Westworld.” “Deuce” has something in common with those shows even though stylistically it is very different. “I find it really interesting when characters seem to be one thing on the surface and we get to find out who they really are underneath,” she said.

3. Gyllenhaal did her homework. One of the sexperts she consulted with in researching the role was former prostitute and porn star Annie Sprinkle. “She had some very simple helpful insights,” Gyllenhaal said. “How many people do you f— a night, what do you do if it’s really cold.” Gyllenhaal also went to the set of a porn shoot in Los Angeles, having been invited by a former adult film star who was working craft services for the shot. “I did get some behind-the-scenes information there,” she said, adding that porn pics “shoot really slowly.”

4. The list of required viewing for working on “Deuce” included classic 1970s pics set in New York City: “Mean Streets,” “Taxi Driver,” “Shaft,” “The Panic in Needle Park” and “The French Connection.” “And then there was the porn. “I thought I’d seen some porn. 1970s porn was way better,” Gyllenhaal said. MacLaren added a director’s perspective to Gyllenhaal’s observation. “There’s not a lot of fantasy make-believe going on — just hardcore real peep having sex,” MacLaren said. “They don’t try to make it look better than it looks.”

5. Gyllenhaal is a producer on “Deuce,” a role she demanded not as a vanity play but as insurance. “I wanted some kind of guarantee that they wanted not just by body but also my mind,” she said. She knew of the renown Simon and Pelecanos earned from their work on past HBO shows, but she didn’t know either of them before “Deuce.” “We didn’t know each other; the risk was big,” she said. “I want to be a producer. I want to be part of the storytelling and the conversation about what happens to this woman.”

6. Gyllenhaal’s gamble paid off. She praised Pelecanos and Simon for fostering a “really trusting, mutually respectful relationship.” She’s even won a few disagreements over changes and details for her character.

7. Most of the Times Square sequences were actually shot in a two-block section of Washington Heights around 164th Street and Amsterdam Avenue. Producers were able to dress those blocks to recreate New York of a generation-and-a-half ago, and they made liberal use of CG technology to strip traces of 2017 out of their frames. Shooting a period piece in Times Square today would be nearly impossible, MacLaren said. “You can’t say to 10 million people: ‘Can you move out of the way and take your cars with you,’ ” she said.

8. Gyllenhaal read scripts for the first three episodes before signing on. She felt a definite shift in the rhythm of the show by the time they got to episode four. “Then I felt they were writing to me, responding to what I was doing,” she said. “It really shifted I think after episode four when (the script) started from scratch with me.”

9. One scene involving a character who is an NYU student was shot in part on 14th Street — until the city’s traffic control officer assigned to the project faced a family emergency and couldn’t make it to the location. Without the ability to control the cars rolling in and out of the shots, the scene had to be shot in two different places. “You’ll notice there’s trees in one part of the scene and not in another,” MacLaren said. When the audience made it clear they hadn’t noticed, MacLaren sounded relieved. “We pulled off the movie magic,” she said.

10. “Deuce” is chock full of “Wire” alums, including Gbenga Akinnagbe, Lawrence Gilliard Jr., Chris Bauer, Anwan Glover and Michael Kostroff.

Other highlights from the inaugural Split Screens Festival focusing on television include Monday’s presentation of an achievement award to “The Sopranos” creator David Chase, which will follow a screening of the beloved “Pine Barrens” episode of the series. “Sopranos” alums Steve Buscemi and writer Terence Winter will be on hand for the session with Chase. Actress-director Lee Grant will also be feted on Monday with the fest’s Legacy kudo, to be presented by Marlo Thomas.

(Pictured: Michelle MacLaren, Maggie Gyllenhaal and Matt Zoller Seitz)