TORONTO – Say what you will about Martin McDonagh, the Irish playwright-turned-screenwriter-director. It’s true he might have lingered too long at the vintage Quentin Tarantino party celebrating outlandish hyper-violence and obsessive pop-cultural awareness. But the guy writes killer dialogue and spiky characters, throwing them together in amusingly baroque ways. He also attracts first-rate talent, which means that while it’s way behind the Pulp Fiction curve, Seven Psychopaths can be terrifically entertaining.

McDonagh’s second feature isn’t as tightly plotted or as distinctive in its setting as his 2008 debut In Bruges, nor is it as thematically expansive or propelled by sheer storytelling brio as his best plays, among them The Beauty Queen of Leenane, The Cripple of Inishmaan and The Pillowman. But what saves it from being merely a show-offy wheel-spinning exercise is the film’s possibly candid acknowledgement of the woes of writer’s block and the challenges of reinventing the crime genre, even in this meta age.

Colin Farrell plays Marty, an Irish screenwriter in Hollywood and a functioning alcoholic, who has the title of his next movie, Seven Psychopaths, but hasn’t gotten beyond EXT. LOS ANGELES STREETCORNER. DAY.

He gets a glimmer of inspiration from a news item on the so-called Jack of Diamonds killer. That mystery figure is glimpsed in action in the opening scene, in which two hitmen (Michael Pitt and Michael Stuhlbarg) are busy defining overkill beneath the Hollywood sign when an assassin in a ski mask strolls up from behind and pops them, leaving the playing card as his signature.

If the name of Farrell’s character and the cameos of the Boardwalk Empire castmates weren’t an explicit enough Martin Scorsese homage, McDonagh also names Marty’s best buddy and would-be writing collaborator Billy Bickle (Sam Rockwell). At one point, Billy even does a quick “You talkin’ to me?”-type Taxi Driver riff. McDonagh also tips his hat to Japanese crime maestro Takeshi Kitano by showing Marty and Billy watching a scene from Violent Cop.

Billy and his preternaturally Zen-like associate Hans (Christopher Walken) run a dognapping scam, swiping pooches from well-heeled locals and then returning them days later to collect a reward. But they make a mistake by taking Bonny, the beloved Shih Tzu of otherwise heartless L.A. gangster Charlie Costello (Woody Harrelson).

Charlie becomes fodder for Marty’s screenplay, and much of the early action strings together vignettes for possible inclusion. Among them is a droll mini-noir featuring Harry Dean Stanton as a Quaker patiently stalking the killer of his daughter. There’s also a former Viet Cong soldier (Long Nguyen) plotting revenge on the American grunts who butchered his family. Responding to an LA Weekly ad placed by Billy canvassing authentic psychopath experience, Tom Waits shows up with a pet bunny, wistfully recalling the wife (Amanda Warren) with whom he traveled the country icing serial murderers until he lost his nerve while she was flambéing the zodiac killer.

Much of this is witty pitch-black absurdism, with McDonagh winking at the audience by having Marty say: “I don’t want it to be one more film about guys with guns in their hands. I want it to be about love.”

The writer-director also indulges in autoironic digs about the misogyny of hipster crime flicks, with Hans observing that women in Marty’s script either do nothing or are there just to be killed off.

That’s pretty much the fate of the female contingent here, including Marty’s prickly Australian girlfriend (Abbie Cornish), who even he doesn’t seem to like much; Charlie’s bitchslapped dogwalker (Gabourey Sidibe); Hans’ wife (Linda Bright Clay), undergoing breast cancer treatment; and sultry Angela (Olga Kurylenko), who’s sleeping with both Charlie and Billy. To keep things equitable, gays, blacks and the obese cop as many slurs as women.

If the overlong film slides into self-indulgence, the actors keep it buoyant, particularly when gonzo Billy takes the script in hand. In a bravura aria from Rockwell, he cooks up an elaborate shootout finale in a B-movie graveyard. However, the real faceoff unfolds among the cacti in Joshua Tree National Park, where Marty, Billy and Hans have taken Bonny to hide out as Charlie closes in.

As creatively bankrupt Marty, Farrell is in subdued mode here, his performance largely defined by the endless expressivity of his eyebrows. He serves as an excellent foil for Rockwell, whose line readings continually dance between knowingness and idiocy, and Walken, who ventures as far into deadpan as you can go while remaining conscious. And Harrelson has fun contrasting his devotion to Bonny with his contempt for humanity.

Shot by Ben Davis with a color-saturated, heightened-reality look that accentuates the cartoonish nature of the violence, the film is a poison-pen love letter to Los Angeles and its surrounds. It benefits in the extended denouement from Carter Burwell’s doleful score, which is supplemented by some cool vocal choices and plays nicely against the verbal comedy. If Seven Psychopaths ultimately isn’t about much beyond its larkish spirit, the amount of blithe bloodletting will surely please fans of souped-up, self-referential crime capers.