Battleaxes and greatswords swing at the same speed, but battle axes do more damage (They are supposed to swing slower but they do not.). Warhammers swing a little slower and do more damage than battle axes.
So, in power:
Warhammer > Battleaxe > Greatsword
And in speed:
Battleaxe = Greatsword > Warhammer
Personally I feel a warhammer is too slow for my liking. The most optimal choice is between that or a battleaxe but the difference in damage is so small you can use whatever looks good or that you like and it'll be fine. --- "Kill all of the enemy units because their red color advocates communism. " -Albin0
Aside from attack speed, I prefer the Warhammer perk - Skull Crusher - Each rank means the hammer ignores 25% of enemy armour... Not that trash in this game ever wears much. The perks for swords and axes are a bit meh.