Even though the new Charlie Day/Ice Cube comedy is called Fist Fight, I kept thinking some script device would materialize to spare the diminutive Day from a beat-down.

That he'd be protected by the same movie-comedy force that protected Bob Hope, Danny Kaye, and Woody Allen.

But there are no reprieves in Fist Fight (opening Friday), a comedy about a teacher (Ice Cube) who challenges a colleague (Day) to a fight in the parking lot after school. In fact, the closing brawl is a titanic smack-down, and it lasts as long as the last 10 Ronda Rousey bouts put together.

"If you are going to call a movie Fist Fight, you'd better deliver on that fight. In fact, we talked a lot about how to make it as epic as possible. The thinking was we have to have a good fight at the end, so that we really end on a high note," said Day, who in some ways came to regret this approach.

"It was, no kidding around, a hellacious experience. Eight straight 12-hour days. Neither Cube nor I are professional stuntmen, so we were not prepared for how physically demanding it would be," said Day, who plays a dweeby English teacher who makes a decision that costs Ice Cube's character  his job, leading to the showdown. Day's character takes increasingly desperate measures to defuse the situation, with no luck. Other teachers (Tracey Morgan, Jillian Bell) are sympathetic but mainly offer advice designed to limit catastrophic physical damage.

"If you're making a Rocky movie, you at least get to train for it, so you can have the appropriate amount of abs," Day said. "Obviously, my character can't be in great shape. He can't have pecs and abs. In fact, the more doughy he looks, the funnier it is."

Funny to watch, not so funny to put on film.

"It's my own fault. I'm sure I could have refused to do certain things, but I always feel like I want to throw myself into the role, sometimes literally. Because you can tell when people are going through the motions. I broke a rib on It's Always Sunny. Kaitlin [Olson] almost broke her neck ramming her head into a car. The attitude on the show is you really go for it, and I brought that with me to Fist Fight."

Certain things?

"There's that moment when Cube throws me up against the side of a school bus. We had to shoot that several times. Or dragging me down the hall by my leg. That's the stuff you want to do, so it looks real," Day said.  "And I really felt an obligation to the movie. I'm not going to say that I carry the film, because there are so many talented people involved, but it's about my character. It follows the arc of my character. I really felt I needed to leave it all out there."

Did the cast and crew have a model in mind from other movies?

"There's this legendary fight scene from the [John Carpenter] movie They Live. Roddy Piper and Keith David. It goes on for like six minutes. No cutting. We were sort of shooting for that record," Day said.

For those who know Day from his Charlie Kelly role on Sunny, the sight of him in khaki and tweed will be an adjustment.

"This guy is actually a lot closer to my actual personality, at least before he comes unhinged by the prospect of getting beat up. I'm not huffing glue like Charlie Kelly. This character is closer to who I am," Day said.

Day comes from a family of educators. Did any of that rub off?

"Who isn't influenced by their parents? Although I never had my dad for class, so it's not like I copied his style."

His father taught music, and Day plays several instruments and composes. Several episodes of Sunny feature his music, perhaps most famously a rock-opera episode titled "The Nightman Cometh,"  which aired in 2008.

It happens to be a particular favorite of Hamilton star/creator Lin-Manuel Miranda, which Day learned, to his astonishment, a few years ago. He attended the Broadway show and thought he saw Miranda eyeballing him during the performance. Afterward, Miranda introduced him to the audience and invited him backstage for a chat.

"He's a fan of Dayman [a character in the opera]."

His interlude with Miranda inspired Day to write another Sunny musical.

Did "The Nightman Cometh" inspire Miranda to write Hamilton?

"Absolutely not," Day said.