Jesse Eisenberg has a reputation for not suffering fools, for witheringly knocking down any stupid questions that are put to him. In the 12 years since his breakout role as a callow, Kafka-referencing teen in Noah Baumbach’s The Squid and the Whale, he has made his name with characters who are – or at least believe they are – the smartest person in the room: the snarky theme-park attendant in Adventureland; the college kid bon-moting his way through the apocalypse in Zombieland; and, of course, his sociopathically still performance as Facebook founder Mark Zuckerberg, for which he received an Oscar nomination for best actor.

In person, speaking at the Toronto international film festival, the 34-year-old is disarmingly alert – quick to answer a question with a question – but never difficult or obtuse. There is a fine seam of comic self-doubt running through his patter and today he is mostly just buzzing with ideas. He is fascinated and appalled by the high-speed, high-frequency trading depicted in his upcoming film The Hummingbird Project – where computer algorithms buy and sell stocks in the blink of an eye – but can relate to people such as his character Vincent, “so caught up in the pursuit that they lose any sight of any kind of ethical considerations”.

“It’s like when you’re acting in a movie and there’s a tree in the middle of the shot,” he says. “The first thought of every person on a crew is: ‘We’ll just cut down the tree,’ rather than move the camera. Because when you’re working on a movie you think that the world needs to see this story, that it’s so important, and of course the tree is irrelevant in the grand scheme of that. Only when the day is over and you look back at it do you think: ‘Well, I really don’t think we needed to cut down the tree to do this horror-comedy …’”

‘You want to keep things interesting by playing characters that seem different’ ... Eisenberg with Alexander Skarsgård in The Hummingbird Project. Photograph: TIFF

If Eisenberg can see the forest for the trees when it comes to Hollywood, it is probably because acting is not the only thing he does. He has written a number of plays, as well as humour pieces and short stories for the New Yorker and McSweeney’s. Most significantly, he has recently become a father for the first time. He and his wife had a son last year, a development that has put his day job into perspective.

“I don’t think I care any less about my work, or like it any less – in some ways, I like it more, because it’s my one opportunity to get away for a few minutes!” he says. “But I do think if humans have the unconscious desire at all to be immortal, maybe that feeling of immortality is being accounted for in another way through their children, rather than through their work, so maybe it takes the pressure off that.”

Having a child has been instructive, not least in terms of the feelings of anxiety that have been a constant in Eisenberg’s life since childhood. He has spoken about being diagnosed with obsessive-compulsive disorder, social anxiety and depression; last year, he recorded a video in which he offered advice to his younger self on overcoming anxiety.

The smartest person in the room? Jesse Eisenberg and Martin Starr in Adventureland. Photograph: Allstar/Miramax/Sportsphoto Ltd

“Just selfishly, having a child is the best thing anyone can do for their own anxiety, if your anxiety is like mine, which is to say based in fantasy,” he says. “Because I spent the first 30 years worrying about things that were invisible, and now I get to worry about something that’s visible, and there’s nothing that’s more mentally healthy than worrying about something that’s actually existing in the world, rather than worrying about something that doesn’t exist at all.”

One of the films for which Eisenberg is best known is Woody Allen’s To Rome With Love, in which he played the central role that Allen might once have played himself; he also starred in the director’s film Café Society and has spoken about the way Allen has inspired him creatively. I wonder, then, how he has processed an allegation of sexual abuse made against Allen by his adopted daughter, Dylan Farrow, which she claims took place when she was seven years old and which has been back in the headlines again this year. (Allen has always maintained his innocence; the claims were investigated at the time and no charges were brought.)

It is a painful question. Eisenberg prefaces his answer by highlighting the work he has done to combat domestic violence and sexual assault. He points out that, for the past decade, he has volunteered at a shelter for victims of domestic violence run by his mother-in-law, who died last year. This is not an empty boast – a campaign he fronted raised hundreds of thousands of dollars to help pay off the shelter’s mortgage. As he is speaking, his Hummingbird Project co-star Salma Hayek walks past and waves hello. “Salma actually asked me to edit her New York Times editorial [in which she alleged sexual harassment by Harvey Weinstein],” he says, after she has gone. “Because she knows my wife, and knows mine and her history, and also enjoys my editing. So this isn’t something I don’t think about or take lightly, this is something I care about in my personal life.” He pauses, weighing up what he is about to say next.

You can’t control how an audience perceives you ... As long as I get to do things I like, I don’t really care Jesse Eisenberg

“As for Woody Allen, I was 16 years old when I discovered him,” he says. “I’ve read everything he’s written, I’ve watched everything he’s made. He’s changed my life more than any other creative inspiration. And so when I read about something like this, it’s upsetting to me and I don’t know what to think, because it exists in a greyer area than a lot of the other allegations. So I don’t want to say anything specific about that, but I’ll just say that those two things are on my mind, my extra-curricular work and also honouring somebody’s feelings who has been hurt.” He smiles nervously. “Was that OK?”

In The Hummingbird Project, the role Eisenberg would normally be expected to take – awkward genius – is filled instead by the Swedish hunk Alexander Skarsgård, who plays Anton, a tech savant with game-changing ideas and a tendency towards introverted awkwardness. (Skarsgård is virtually unrecognisable in a bald cap and a prosthetic pot belly.) Eisenberg plays Anton’s striver cousin, the man who facilitates his genius.

Together, the pair devise an ambitious plan to lay a fibre-optic cable from Kansas to New Jersey, under rivers, mountains and millions of homes. The aim of this quixotic endeavour is to receive stock-market information one millisecond faster than the high-frequency traders on Wall Street, a tiny advantage that could net Vincent, Anton and their clients hundreds of millions of dollars.

‘He’s changed my life more than any other creative inspiration’ ... Eisenberg with Woody Allen and Kristen Stewart at the premiere of Café Society. Photograph: Vincent Desailly/Getty Images

The Canadian director Kim Nguyen films all this as a high-stakes caper: the pair race against time to get their cable operational and face a formidable, power-suited rival in Hayek’s stock-exchange boss. Anton is the brains of the operation, with Vincent providing the unrelenting drive and gift of the gab.

Nguyen sent Eisenberg the roles of Anton and Vincent and he opted for the one that seemed most out of character. “I just knew I didn’t want to play the socially aloof genius, because I’d done that, and also because I liked Vincent more,” he says. “The only thought I had was to play the dumber hustler.”

Despite the attempt to play against type, early reviews of The Hummingbird Project have noted that Vincent has an inherent Eisenbergness: the pointed staccato delivery, the restless physicality and the sardonic worldview we have come to expect in his performances. That seems a touch unfair. Vincent, for reasons that become apparent in the film, is a more heroic and poignant figure than Eisenberg’s previous creations, but by now it is a characterisation with which the actor has become familiar – and even comfortable.

Sociopathically still ... Eisenberg and Justin Timberlake in The Social Network. Photograph: Columbia Pictures/Sportsphoto/Allstar

“You just want to keep things interesting for yourself by playing characters that seem different, but you can’t control how an audience perceives you,” he sayswith a shrug. “As long as I get to do things I like, I don’t really care.”

Sometimes Eisenberg cares a little too much. In 2015, he wrote a New Yorker short story entitled An Honest Film Review. Written from the perspective of a middling, snarky critic who takes marks off the film he is reviewing because the press screening is on the other side of town, the piece was intended as a lighthearted dig at “the one guy who doesn’t take his job seriously and only reviews movies in so far as it affects him or her personally”, Eisenberg says. It did not go down that way – it was seen as an attack on film criticism in general. Critics hit back at him on Twitter and in articles. The reaction horrified him.

“I was depressed like you cannot imagine,” he says. “I mean, I was crying when my sister called me and told me: ‘You’re getting [abuse],’ because I didn’t want to hurt anybody’s feelings. When I was thinking about it, I thought: ‘Oh, film critics are going to like it, because they’ll probably know one person who is like this.’ But I guess that people wrote mean things about me on Twitter, and I haven’t read any of that, but it still makes me feel horrible.”

Was he worried that critics might turn on him professionally? “No, I never would have published it in a million years [if I thought that were the case],” he says, shaking his head vigorously. “It’s not worth it to me. My main profession is acting in movies. No, it was absolutely a shock and totally mortifying and, to me, completely misunderstood. I read So You’ve Been Publicly Shamed by Jon Ronson and I related to it in that way.” In his book, Ronson writes about the internet phenomenon of public shaming and how individuals can find themselves pursued relentlessly by an online mob. “Of course, my experience was nowhere near as extreme as the girl who lost her job on the plane to Africa, but I thought: ‘Oh, goodness, I’ve been completely misunderstood over something that was a joke.’ I thought there was absolutely zero danger. If I thought there was 1% danger, I would never have done it.”