The majority of my game time has been inside a Viper. I love the Viper, but in my opinion, if I fought myself, as some magical-like-minded clone, I would lose the fight. The Viper and Cobra are similar in terms of overall maneuverability, but a combat spec Cobra will pitch faster than a Viper will. The Viper has a different flying style, relying on more vector control, which means in a standard loop-loop-loop-loop dogfight, the most basic of kinds you can have, the Cobra would be a better turner. There wouldn't be a big difference between the two if their weight allotment was similarly used up BUT..
A combat spec Cobra will be sitting far below it's max thruster's optimal weight, this is why you can get your cobra to get to speeds around 430 in a straight boost. A Viper can only really cut down on its weight by a few tons below optimal. If you further reduce the Viper's weight, you'll reduce your ability to fight, aka, shield cell banks, which can be very heavy on the very weight conscious Viper.
The Cobra can also have more shield cells, while being under its optimal weight, meaning better maneuverability and boost speeds across the board, compared to a similarly spec'd Viper, who would be under weight, but only boosting around 400-405. If the cobra runs and wants to jump away, the Viper cannot maintain distance on him for very long, and also does not negate the Cobra's jump via mass. Likewise, the Cobra can chase down a fleeing Viper and slow down its ability to jump due to the mass difference, and also be around 30 units of speed faster.
The Viper accelerates and slows down faster than the Cobra, and can vector up, down, and left and right better. But it will be slower than the Cobra in straight line boosting, and in pitch turning. The Viper's shields with a "A" shield generator are very tough, but in a prolonged fight where the combatants are using shield cells, the Viper on equal terms, is likely to run out of cells before an equally stocked Cobra will.
(To the comment earlier, Chaff does not affect NPCs. It doesn't. Just fight an Elite Anaconda with beam turrets and pop chaff, they won't lose lock and will continue unimpeded blasting at your shields.)