There ARE differences in tractive effort & gear ratio, especially on camel hump gradients, locos have to struggle hard to get across. On a plain land, service of WAP/WDP/WDG/WDM/WAG will be same & those with highest T.E. & H.P. will be the winners, but on gradients, goods class locos will serve better than passenger class, just because of a different gear ratio than P class locos, which(class G) are meant for hauling heavy freights. Due to the same reason, G class locos are used as bankers. Now this doesn't mean P class locos cannot run on gradients.