Attack speed

Attack speed in Terraria refers to the rate at which a weapon can attack. Despite many modifiers and effects showing changes to attack or melee speed, attack speed is not an in-game statistic and is instead determined by its reciprocal, known as use time. This is the amount time it takes to swing (attack with) or use an item. If use time increases, attack speed decreases, and vice versa. For example, a weapon with a use time of 30 will have a lower attack speed (slower rate of fire) than a weapon with a use time of 10. As such, any attack speed modifiers will in actuality act as a variable within the use time equation. However, as shown below, for many melee weapons a change in attack speed (and therefore use time) will have effects other than a change in use time.

While almost all weapons can receive attack speed modifiers, such as Quick or Legendary, accessories will only ever provide bonuses to melee speed.

Effects on special types of melee weapons
Melee speed bonuses affect different types of melee weapons in different ways. For most endgame weapons, it does not increase DPS, as most of them fall into one of the following categories:

Projectile melee weapons
Melee speed only affects the actual swinging animation and not the rate at which a weapon fires projectiles, with few exceptions such as the Terra Blade. In other cases, however, the speed at which the projectile fires is the same regardless of having +10% melee speed or +200% melee speed. Melee speed does, however, affect the speed at which the projectile travels. The Terragrim, Arkhalis, and Starlight's main attacks are considered projectiles, and do not benefit from melee attack speed boosts.

Yoyos
Melee speed bonuses increase the length of a Yoyo's string, but not its attack rate. This can be very helpful in the early game, when yoyos are very short and hard to hit bosses with, and against bosses where you need to keep a distance (such as Empress of Light). The exact multiplier for yoyo string length is, where melee speed is   without buffs. Thus, if the player can reach 2x melee speed through buffs, the yoyo string will be 75% longer.

Flails
Similar to yoyos, Flails do not attack more often with melee speed boosts, but they reach further and shoot out faster, making them much better at hitting flying targets.

Whips
Despite doing summoning damage, Whips are heavily affected by melee speed, making them one of the few endgame weapons whose DPS is directly affected by melee speed.

Spears
Spears gain additional reach from melee speed but not additional DPS. Instead, they move faster during each swing to make up for the increased travel distance.

Boomerangs
Boomerangs gain additional range from melee speed.