Maybe many and even most are on the spectrum, but not all are.
And even then, its a _spectrum_ meaning every person has a their own unique mix of, lets just call them quirks.
Meaning they (and you) are more than a single word like "autism". In fact in Sweden we've moved away from the "autistic diagnosis" because it's too simplistic. It's dangerous to be too caught up in "being autistic" that we hinder ourselves and others when we can do more.
Signed, a dad with autistic tendencies and a 4-year old child with may quirks that already give us quite a lot of challenges.
I am on the spectrum but I definitely know nerds (although not necessarily weird nerds) who are insanely good programmers/computer scientists (and do have that as their hyper specialized interest) who are not on the spectrum.
But the thing is, it's a spectrum.. Personally I do find it a little ridiculous because the biggest parts of autism have absolutely nothing to do with my work/interests but with social life, sensory issues, etc. And it's definitely more a struggle than a superpower (at least to me).
I say this as a weird nerd who is definitely on the spectrum, like I suspect many HN readers are.