Except it doesn't. Long weapons (within reason) should always attack first, except in a grapple.
A dagger will be light enough that its speed is limited by how fast the wielder can move their arm. When thrusting it will have a reach of three feet or so, including arm. When swinging it will be moving a little faster as it is a 1 foot or so lever.
A sword will also be (almost exactly) light enough that its speed will be limited by how fast the wielder can move their arm. When thrusting it will be as fast as the dagger, but will have a reach of five or so feet, including arm. When swinging, it will be MUCH faster, as it is a three foot or so lever.
A two handed "war" sword will be faster yet: it will be light enough that when swung two handed its speed will be limited by how fast the wielder can move their arms, and it will be a 6-7 foot reach and a four-five foot lever.
Polearms like bills or halberds are reaching the point where they are getting a little heavy, so their thrusts might be a little slower, depending on the wielder's strength. At the swing speed will be more than made up for by the 7-9 foot lever.
Spears will probably be about as fast at the thrust as the dagger, but 6 feet plus long.
In actual fact "lightness" is mostly irrelevant, unless someone is wielding someone else's weapon which is too heavy for them. Reach is pretty much all: unless the shorter weapon wielder can close to grapple. If we are trying to be realistic about this, a dagger wielder should have to use some sort of feat or maneuver to be able to attack a 2hander or polearm wielder at all.