We study performance and competition among firms engaging in high-frequency trading (HFT). We construct measures of latency and find that differences in relative latency account for large differences in HFT firms’ trading performance. HFT firms that improve their latency rank due to colocation upgrades see improved trading performance. The stronger performance associated with speed comes through both the short-lived information channel and the risk management channel, and speed is useful for various strategies, including market making and cross-market arbitrage. We find empirical support for many predictions regarding relative latency competition.