iirc (again, from Chappelle), the longest practical wooden ship was about 300 ft (maybe 350 ft) on the waterline. Sailing ships don't plane -- they're too heavy -- although small sailing craft may (indeed, there are sailing hydrofoils), so they're quite strictly bound to speed-length ratios (speed in knots divided by square root of waterline length in feet) of less than about 1.3.
Warships were under three major constraints that merchant ships were not: they had to accommodate huge crews, they had to accommodate large, heavy guns high enough about the ship's waterline to be useful, and they had to expect people shooting at them. Their guns, and the guns of others, drove the ships' scantlings, which made their hulls much heavier than merchant ships of the same size, which would make them slower. Since warships were expensive, governments would build them to last, while merchant ships were built well enough to be profitable. In other words, most merchant ships would not be built of properly-seasoned oak; they were more likely to be built of green fir. Again: build to last vs build to profit.
In reality, at the time (again, from Chappelle), maximum speed was not the most important criterion for a warship: weatherliness (how close it could sail to the wind) was more important, as was ease of maneuver. The former may seem to argue against square-rigged ships, but the fore-and-aft rig had many practical disadvantages (including maneuverability) which restricted its use to small vessels, like RN and US Revenue Marine cutters (the former were, for many years, cutter-rigged, hence the name). The huge schooners, like the
Thomas W Lawson at the end of sail were not more weatherly than contemporary square-riggers; their main advantage was that all the sail handling could be done from the deck.
Another problem with sailing ship speed was that the propulsive thrust was considerably above the ship's center of gravity, so a ship would heel (even square riggers were faster with the wind abeam than dead astern), and too much thrust could cause a ship to roll over. This would be bad, and resulted in the loss of
the
Somers (see
http://www.history.navy.mil/danfs/s15/somers-ii.htm ) and her sister ship,
Bainbridge.
Because of this heavier ships, like liners could be faster than lighter, nominally faster ships in heavy winds. Liners, like
HMS Victory, the USN's heavy frigates, like
Constitution, or the RN's razees could probably run down smaller contemporaries because they could carry full sail (even studdingsails) in weather that would force the smaller ship to reduce sail, perhaps even heave to.