all in all the "gun" would be the best choice in almost an situation.
take the 7.62x38 m-43 round for the ak-47.light recoil,smallish round,yet an can go threw a wall,or a car doors with ease and still be leathel.used in the ak-47 it has a range of aprox. 350 meters ,and the abilitry to punch threw a lev 3 balistic vest at that range.at close range us can use fully auto fire to engage large groups of targets ,add to it a 75 round rpk drum,and you have a good deal of fire power.
the .308 round (7.62 nato) that the m-14 uses is even more powerfull,though the weapon is much more heavy.with a scope and a match grade berrel engaging targets at 600 meters isnt a huge issue at all,making it a nice semi auto sniper rifle.the us forces use a reconfigured m-14 for sniping/coutersniping called an m-21.
i own bolth an ak-47(slr-95 civilian version) and an m-14
along with many others.so i know i tiny bit about em
the last thing ill say,and i hope this isnt a touchy subject ,is the japanese in ww2 answered the question.the bonzai charge proves which is better...1000 dedicated men with fixed bayonets and swords...or a heavely armed mechinegun laden defender.
no one can doubt the bravery and skill of the japanses soldeirs in those charges,but nothing could make up for a rain of automatic fire.
in war the "gun" rains supreem.
sure you can come up with odd situations in personal combat were a sword might be more effective,but there is a reason why people rob banks with guns...they work
*ill tell ya what though...there aint nothing in this world as great a feeling,as wielding cold steel effective or not
**