If it is a shorter, straighter route, then go up and out thru the roof . Install a proper weather cap , flashing, rain skirt, etc. If you are in a snow area, then terminate the cap approx 3' above the surface of the roof. Make sure you have a 'backdraft' damper installed in or at the cap.
Note; soffit installations are quite ok too, if you put the proper "T" shaped exhaust cap at the soffit .This "T" shaped cap has built in 'backdraft' flappers, and when the dryer is on the air is discharged at right angles.So no significant amount of air will ever go back thru the perforated soffit.
Whatever way you decide make sure it is the shortest and uses the less elbows, etc.