Attack speed

Attack speed is the rate at which your character attacks. The base attack speed is generally the same for all races and classes, except:
 * Base attack bonus - classes with full BAB attack slightly faster
 * Enhancements may increase your attack speed

Doublestrike / Doubleshot also affects how many attacks makes your character per minute. Therefore, when testing your attack speed, you need to count the number of attack animations, not the number of attack rolls.

Attack speed and movement
Your attack speed changes if your character is moving (because your attack animation is often different while moving)
 * Single Weapon Fighting has a high attack speed while moving
 * Two-Weapon Fighting has a low attack speed while moving
 * Ranged? ..

Twitching
While standing still, depending on your fighting style, your attack animations have different duration (see attack sequence). It is possible to interrupt the attack animation by making a tiny step (twitching) or a special attack (for example, Cleave).

Autoattack vs holding the attack button vs clicking
Depending on your combat style, there might be an attack speed difference if you're using autoattack, if you're holding the attack button, or if you are actively clicking the attack button.

(?) Repeating crossbows benefit from active clicking to speed up the reload animation (?)

Ranged weapons anomaly
Ranged weapons suffer from the issue where any speed bonuses (or penalties) only apply half their stated value due to the reload animation. The developers are aware that this issue is present. If you cast the spell Haste it grants a 15% bonus to melee attack speed (although, most melee forms actually go a little bit faster than this due to animation quirks) and a 22% bonus to ranged attack speed. 
 * Bows are 33% firing and 67% reload for the full animation, so multiply the change in speed by 66% (a 10% bonus to ranged speed nets 6.6%).
 * Thrown Weapons are 67% firing and 33% reload for the full animation, so multiply the change in speed by 83% (a 10% bonus to ranged speed nets 8.3%).
 * Repeating crossbows have 3 animations: position to fire, fire, reload. Each animation has its own quirks.

Base attack bonus
Your base classes and epic levels affect your base attack bonus. Certain spells and abilities make your base attack bonus equal to character level: see list.
 * For melee weapons, attack speed increases at BAB 1, 3, 5, 10, 15, 20, and 25
 * For bows and thrown, attack speed increases with each point of BAB, and it grows much faster than for melee.

Class features

 * Druid in wolf / winter wolf form - +30%
 * Fighter/Paladin Vanguard enhancements - +20% Combat Style bonus
 * Monk's Unarmed attacks about 10% faster than regular TWF
 * Rogue Thief-Acrobat enhancements - +15% for quarterstaves

Feats
For projectile weapons (bows and crossbows) (and thrown??), there are two important animations, attack and reload. Reduced effect... yada yada
 * Quick Draw, Rapid Reload, Rapid Shot
 * Blinding Speed - Enhancement bonus
 * Single Weapon Fighting - Combat Style bonus
 * Adept of Forms, Master of Forms, Grandmaster of Forms - Enhancement bonus in Wind stance

Items
Some items can increase your attack speed. For each bonus type, only the highest bonus applies. Different bonuses stack. In general, bonuses to attack speed stack by addition. For example, 15% bonus from Haste and 30% bonus from Haste Boost stacks for a total of +45%.

Enhancement bonus:

 * Air Guard item enchantment: +15%
 * Armor of Speed spell: 15%
 * Blinding Speed feat: +15%
 * Haste spell: +15%
 * Melee Alacrity item enchantment: +10%
 * Ranged Alacrity item enchantment: +10%
 * Speed item enchantment: +1% to +15%
 * See also: Monk's wind stance also grants enhancement bonus to attack speed

Competence bonus:

 * Gilvaenor's Arcane Archer set
 * See also Fatesinger: Fragment of the Song: Valor (3%)

Epic Destinies

 * Shiradi Champion T3 - Whirling Wrist - up to +60% untyped bonus for thrown weapons
 * Fatesinger T4: Echoes of the Ancestors: Primal (Shiradi Champion) - +10% untyped bonus for bows and thrown
 * Fatesinger T5: Fragment of the Song: Valor - 3% Competence bonus for melee

Action Boost

 * Haste boost
 * any other obscure boost?