Jesse Eisenberg stars alongside himself in Richard Ayoade's adaptation of a Dostoyevsky story about a meek office worker who is confronted by his confident, aggressive doppelgänger. It's a brilliant copy of a great original, says Henry Barnes

Dank and depressing, spurred by impotent rage and deflated ambition, The Double arrives as the black sheep of this year's Toronto film festival. It's a moody, gloomy comedy. A taut study of self-identity that comes up with no easy answers. It's totally out of step with the festival's sunny tastes. It might just be the best thing we'll see all week.

Submarine director Richard Ayoade's second film lays Fyodor Dostoyevsky's novella out in a nowhere land of office bureaucracy. Jesse Eisenberg plays Simon James, a skivvying worker bee who's belittled by his colleagues and shunned by Hannah (Mia Wasikowska) the elfin girl who works the office's giant, clanking photocopier. Eisenberg also plays James Simon, Simon James' doppelgänger, who arrives unannounced, wins over the boss and immediately starts dating Hannah. No-one reacts to the duplication, because Simon's such a nobody. You don't know it's a copy if you haven't seen the original.

The Double mirrors aspects of Gilliam, Gondry and the Coen brothers' Hudsucker Proxy. Ayoade shares those directors' intricacy. He uses sound rhythmically, builds farce and tragedy out of the simplest devices. A beautiful moment of character exposition pops up as Simon heads to the office. A workman methodically stacks boxes onto the tube as Simon tries to leave. The action swings into time with the soundtrack. Simon steps around the man, but each time the worker is back in the way. It's a clever, funny and moving little scene. An immediate indication of how hopeless Simon is. Everything, inside and out of the fiction, is against him. A blender roars to life as he tries to listen in on a conversation. A draft whips up and drowns him out when he thinks of something clever to say. Ayoade's killer script takes evil pleasure in having Simon swallow his words and stutter through life.

Eisenberg's last film, the bumpy magician heist movie Now You See Me, saw the nervy actor play an arrogant card shark. He's said that that role freed him, allowed him to unleashing a side of himself that made him feel more confident. At times the actor's nervousness can slip into arrogance. The Double plays on this. James is gregarious and cool - everything that Simon (and Eisenberg) aspire to be. It's a superb piece of meta-casting.

Ayoade isn't a spontaneous director - there's a plot and a plan at work here. Everything, from the repetition in the soundtrack to Ayoade's recruitment of many of the actors he used in Submarine as The Double's bored salarymen - slips into the spirit of the fiction. Because of this some may find The Double a little arch, a touch too fastidious, but there's a real creative energy at force. This kind of exactitude is what makes for great comedy, even one that at times lacks heart.

The Double isn't an original idea. It wasn't even in Dostoyevsky's time. But it's a great story. And Ayoade has produced a brilliant copy.