The easiest answer is a ranger is better for twf because he only needs a 11 dex and a +2 tome to get tempest becauase he/she gets twf for free regardless of dex. If they didn't want tempest (not sure whythey would) they could start at 8 8 dex. The rest of the points can go into str and con a fighter has to get their dex way higher thus less points for con and str.

When this is done a human ranger can clear 550 hp with the right gear which is more than enough for any quest even if tanking. Add in 6 or 8 levels of fighter for kensai and FTR str 2 and the ranger will out perform the fighter. A pure fighter will only have 1 more point in str than the ranger who has rams might on so there is no real difference in str damage and the ranger will also have ftr haste boost not as high of an attack speed % but not too far off than a pure fighter.

There really is no reason to go more than 12 levels of ranger IMO. Actully I prefer to go 11 ranger, 6 fighter, and 3 pally. Dump wis put the points into cha take Force of pesonality. Saves go thru the roof and UMDing heal scrolls are a peice of cake. Along with that you're immune to disease and fear, and get 3 Fe's, and able to buff as well.

Add it all together and IMO the ranger wins out by a slight margin. If nothing esle because of the extra stat points at roll up. The only thing the ranger misses in a 12/8 or an 11/6/3 toon is a couple of feats and a few hp. But the HP gap is usually closed by the extra stat points available to con that the fighter would have to put into dex.