The New York-based 1970s film was one of the defining movies of a generation - but Filth writer Irvine Welsh claims McAvoy has topped it in the film of his book.
The Trainspotting and The Acid House author was speaking before the Glasgow premiere of the controversial movie.
He joined McAvoy, who is originally from Drumchapel, on the red carpet to talk about the transformation of his novel to the big screen.
Welsh said: "I saw a performance a few years ago by Michael Shannon in the film Take Shelter and I thought it was one of the most remarkable portrayals I had seen since Robert de Niro in Taxi Driver.
"And I would say that James beats both of those in this film. You really dislike his character but you feel for him too, you want to know what happens to him. James just nailed it."
Filth tells the story of corrupt policeman Bruce Robertson and was partially shot in Glasgow.
Stars of the film gathered at Renfrew Street's Cineworld to watch the Glasgow premiere, 24 hours after an Edinburgh screening.
McAvoy said he was delighted to be back in his home city. He said: "I am really proud and happy that we managed to get a screening here. It may be an Edinburgh-based film but it was Glasgow that made it."