Attack speed

Attack Speed in Terraria is handled like movement speed; Additive bonuses, except the cap, are at quadruple the original speed. However use time, or the time it takes to swing (attack) or use an item, is reduced instead of increased (see that page for a more detailed formula). In addition, for melee weapon with a projectile, the Attack Speed also increase the Velocity of that projectile by that many percent. Use time of 30 is slower than use time of 10. See weapon list for an organized view of this.

Max increased attack speed (for melee) is +158.1% using Monk's Bushy Brow Bald Cap (20%), Shinobi Infiltrator's Torso (20%), Solar Flare Leggings (15%), Exquisitely Stuffed (buff) (10%), Tipsy (buff) (10%), and the five accessories Feral Claws (12%), Power Glove (12%), Mechanical Glove (12%), Celestial Shell (15.1% at night) and Berserker's Glove (12%), each reforged to Violent (20%). In Expert Mode Violent Fire Gauntlet can be worn for an extra 16%, with +174.1% total; In Master Mode an additional Violent accessory (note, as of 1.4, the stones' effect no long stacks) can be worn for an extra 4%, with +178.1% total. When combined with the fastest melee weapon, the Fetid Baghnakhs, a player may execute a full melee attack in roughly 0.033 seconds, or thirty times per second (note:as of 1.4, it can only receive up to +25% speed bonus).

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. So even if a Terra Blade gets a +100% bonus, it will not shoot projectiles at a faster rate than before.

It does, however, affect the speed at which the projectile travels, and it still affects the base weapon (so, for instance, attacking directly with the Terra Blade will benefit from increased weapon speed).

The Terragrim, Arkhalis, and Starlight's main attacks are considered projectiles, and do not benefit from melee 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 (1+3*(melee speed))/4, where melee speed is 1.0 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.