Source: https://lipn.univ-paris13.fr/~levy/algoA/cours7performances.pdf