they are almost exact but just 2 cylinders add.
5.4L are fast and rev quick moving fast enough. But tow it ok if gear ratio is higher.
6.8L are sightly fast but longer and can rev easy. Moving kind slow due 10 cylinders to get spin. It can tow anything.
5.4L with 3.73 gear ratio is BAD choice for tow or plow in F250 or F350. 4.10 or high is best.
I like 5.4L over 6.8L why I want moving FAST and get little better on gas. We have 6.8L it reliable have 255,000 miles on it.
info on hp and torque
Horsepower 300 SAE net @ 5000 rpm
Torque 365 lb.-ft. @ 3750 rpm
Horsepower 362 SAE net @ 4750 rpm
Torque 457 lb.-ft. @ 3250 rpm