Comparing different algorithms is hard. For almost any pair of algorithms and measure of algorithm performance-like running time or solution quality-each algorithm will perform better than the other on some inputs. 1 For example, the insertion sort algorithm is faster than merge sort on already-sorted arrays but slower on many other inputs. When two algorithms have incomparable performance, how can we deem one of them "better than" the other?Worst-case analysis is a specific modeling choice in the analysis of algorithms, where the overall performance of an algorithm is summarized by its worst performance on any input of a given size. The "better" algorithm is then the one with superior worst-case performance. Merge sort, with its worst-case asymptotic running time of Θ(n log n) for arrays of length n, is better in this sense than insertion sort, which has a worst-case running time of Θ(n 2 ).While crude, worst-case analysis can be tremendously useful, and it is the dominant paradigm for algorithm analysis in theoretical computer science. A good worst-case guarantee is the bestcase scenario for an algorithm, certifying its general-purpose utility and absolving its users from understanding which inputs are relevant to their applications. Remarkably, for many fundamental computational problems, there are algorithms with excellent worst-case performance guarantees. The lion's share of an undergraduate algorithms course comprises algorithms that run in linear or near-linear time in the worst case.For many problems a bit beyond the scope of an undergraduate course, however, the downside of worst-case analysis rears its ugly head. We next review three classical examples where worstcase analysis gives misleading or useless advice about how to solve a problem; further examples in modern machine learning are described later. These examples motivate the alternatives to worstcase analysis described in the rest of the article. 2The simplex method for linear programming. Perhaps the most famous failure of worstcase analysis concerns linear programming, the problem of optimizing a linear function subject to linear constraints (Figure 1). Dantzig's simplex method is an algorithm from the 1940s that