Nor in the workplace. That's how sexual harassment happens.
If the comment was "X women do it better" it would still be inappropriate.
Ironically, the HR staff member present during the interview was a gay man himself. I guess he must be homophobic in your eyes also for discarding the application?