Well, it depends what you mean by "effect". I certainly think I cope with it better because I am aware of what is going on. I'm experienced and successful enough to be confident in my code, and I got there in part by learning about sexism and how it functioned so I could sift what of my personal judgement was about me and my performance from what was about the people around me.

The whole experience is very lizard-brain; I can rationalize it after the fact and compensate for the dynamic when making decisions, but that doesn't completely get rid of the emotions in the first place. Like how just because you know a film is a horror film doesn't mean you don't startle when something jumps out at the screen.

I don't know for sure if it affects my performance, since I haven't performed tests on myself, but I believe the evidence I have read that suggests it probably does. I can't really explain the mental toll that that being a constant visible outsider takes, especially when people around you say things about the group you belong to without remembering that you are one. It's not crippling, but it isn't pleasant either; sort of like wearing ten pound weights all the time.

I don't think having more women around would make me more confident in my job performance, but it would make me more confident in my employment and leave more energy to devote to the job. Jobs, especially programming, include teamwork, camaraderie and talking with coworkers. It's a lot harder to relax and fit in when you don't entirely no matter what you do.

I don't want to give the impression that this is all in women's heads either. Groups of people bond over whatever they have in common, whether it is shoes, pets, culture or gender. Right now, if some guy in the work place says something sexist or talks about how weird and incomprehensible their wives are or talks about typically-masculine things like cars or football or scotch or how they hate GUIs or how people need to stop being such pussies or how the best coders are all men, they are signaling group membership by defining themselves against another group, which I can't help but belong to. Even if I don't say anything at all, just existing is enough to disrupt the maleness-centered bonding that would otherwise be going on (at best. At worst I get "complements" like, "oh, you're not like other women!" and they keep on defining group membership in a way that would exclude me if they hadn't made some careful and possibly-temporary exception in their mind.)
Once there are enough women in a space, dudes stop trying to bond over how male we all are and we can start bonding over the work we do or the books we like or whatever the reason is we are actually there.

I think when there get to be enough women in a group it improves some men's performance too. There are some men who backlash when it happens because they have defined themselves by the masculinity of their groups. They are the ones who talk about how we don't need to worry about there being no women in CS and how the whole thing is biology; those opinions don't magically change when women do enter a field, even though they become pretty silly. On the other hand, other men can stop worrying about whether they are acting manly enough and stop spending effort to hide parts of themselves to better fit in to unrealistic masculine norms and focus instead on the work at hand.