More often than not, Twitter sucks.

Well, not the social-media platform itself, but the way a lot of people use it. The way they hide behind the anonymity of their Twitter handles to spew venom and ignorance.

Back when most of our interactions were personal, many bigots, misogynists and homophobes made some effort to keep their vile views to themselves — albeit not altogether successfully. Today, they proudly broadcast their hate and anger on Twitter, and they’ve come to believe their views are acceptable.

Like Fox News, this has not made the world a better place.

On a much less important level, it’s annoying that so many people respond to a tweet without bothering to click on the link to read what they’re commenting on. So they’re … um, off base.

OK, First World problem. Goes with the job. Sorry for whining.

So imagine my surprise when I learned that Twitter is directly responsible for Benedict Cumberbatch starring in “Patrick Melrose.” If there’s any justice to this year’s Emmys (always a big if), Cumberbatch will win one come September.

(Photo: Ollie Upton/Showtime) Benedict Cumberbatch stars as the title character in “Patrick Melrose.”

He ended up playing the title character because (a) he loves Edward St. Aubyn’s semi-autobiographical novels, on which the five-part series is based; (b) he’s always wanted to play Patrick Melrose; and (c) Twitter.

Somebody tweeted about Benedict wanting to play the part,” said executive producer Michael Jackson. “And we said, ‘Aha!’ We actually rang up his people, and we had a coffee.

Here is an example of something really positive that happened because of Twitter.”

Who would’ve thought?

Turns out Cumberbatch himself had tweeted his desire to play the part.

Did I say I was a stable genius in that tweet?” he said, taking a shot at Donald Trump. “I want to play an unstable genius. That’s my twist on that tweet.”

Patrick Melrose isn’t a genius, but he’s certainly unstable. This five-episode series — one episode per book — tells the story of an abused boy who grew up in a British world of privilege and became a self-destructive drug addict and bon vivant, a dichotomy that Cumberbatch portrays in amazing fashion. His performance as Patrick is repellent and riveting, horrifying and hilarious.

(Photo: Ollie Upton/Showtime) Benedict Cumberbatch stars as the title character in “Patrick Melrose.”

Saturday’s premiere (7, 8:05 and 9:10 p.m., Showtime) veers from ghastly scenes of Patrick shooting heroin to weirdly gleeful scenes of Patrick on Quaaludes. And, as the extent of the abuse he suffered is revealed in flashbacks, we understand his response when asked how his father died: “I forgot to ask. I was too dizzy with glee. I’m sorry — I mean, dazed with grief.”

Cumberbatch’s performance is nothing short of spectacular.

Good things can come from Twitter,” Cumberbatch said. “World wars can also come from Twitter, but, hey, I got a part out of it, so I’m not complaining.”