Table of Contents
Fetching ...

How fast are algorithms reducing the demands on memory? A survey of progress in space complexity

Hayden Rome, Jayson Lynch, Jeffery Li, Chirag Falor, Neil Thompson

TL;DR

This paper presents the first large-scale survey of space (auxiliary) complexity across 118 algorithm families and 800+ algorithms, highlighting how memory usage increasingly shapes performance alongside time. Using Word RAM/Real RAM models and a high-water-mark space measure, it quantifies distributions, correlations with time, and yearly Improvement rates, and documents the emergence of time-space Pareto frontiers. The study finds that space complexity is often linear or smaller for most problems but that space improvements are relatively rare and sometimes outpace hardware improvements, underscoring memory-wall concerns. The accompanying public Algorithm Wiki repository provides a platform for researchers and practitioners to compare space-time tradeoffs and to pursue more space-efficient algorithm designs.

Abstract

Algorithm research focuses primarily on how many operations processors need to do (time complexity). But for many problems, both the runtime and energy used are dominated by memory accesses. In this paper, we present the first broad survey of how algorithmic progress has improved memory usage (space complexity). We analyze 118 of the most important algorithm problems in computer science, reviewing the 800+ algorithms used to solve them. Our results show that space complexity has become much more important in recent years as worries have arisen about memory access bottle-necking performance (the ``memory wall''). In 20% of cases we find that space complexity improvements for large problems (n=1 billion) outpaced improvements in DRAM access speed, suggesting that for these problems algorithmic progress played a larger role than hardware progress in minimizing memory access delays. Increasingly, we also see the emergence of algorithmic Pareto frontiers, where getting better asymptotic time complexity for a problem requires getting worse asymptotic space complexity, and vice-versa. This tension implies that programmers will increasingly need to consider multiple algorithmic options to understand which is best for their particular problem. To help theorists and practitioners alike consider these trade-offs, we have created a reference for them at https://algorithm-wiki.csail.mit.edu.

How fast are algorithms reducing the demands on memory? A survey of progress in space complexity

TL;DR

This paper presents the first large-scale survey of space (auxiliary) complexity across 118 algorithm families and 800+ algorithms, highlighting how memory usage increasingly shapes performance alongside time. Using Word RAM/Real RAM models and a high-water-mark space measure, it quantifies distributions, correlations with time, and yearly Improvement rates, and documents the emergence of time-space Pareto frontiers. The study finds that space complexity is often linear or smaller for most problems but that space improvements are relatively rare and sometimes outpace hardware improvements, underscoring memory-wall concerns. The accompanying public Algorithm Wiki repository provides a platform for researchers and practitioners to compare space-time tradeoffs and to pursue more space-efficient algorithm designs.

Abstract

Algorithm research focuses primarily on how many operations processors need to do (time complexity). But for many problems, both the runtime and energy used are dominated by memory accesses. In this paper, we present the first broad survey of how algorithmic progress has improved memory usage (space complexity). We analyze 118 of the most important algorithm problems in computer science, reviewing the 800+ algorithms used to solve them. Our results show that space complexity has become much more important in recent years as worries have arisen about memory access bottle-necking performance (the ``memory wall''). In 20% of cases we find that space complexity improvements for large problems (n=1 billion) outpaced improvements in DRAM access speed, suggesting that for these problems algorithmic progress played a larger role than hardware progress in minimizing memory access delays. Increasingly, we also see the emergence of algorithmic Pareto frontiers, where getting better asymptotic time complexity for a problem requires getting worse asymptotic space complexity, and vice-versa. This tension implies that programmers will increasingly need to consider multiple algorithmic options to understand which is best for their particular problem. To help theorists and practitioners alike consider these trade-offs, we have created a reference for them at https://algorithm-wiki.csail.mit.edu.

Paper Structure

This paper contains 20 sections, 2 equations, 5 figures.

Figures (5)

  • Figure 1: Percentage of algorithms published in each decade with space analysis in the original paper or later.
  • Figure 2: Overview of Algorithm Landscape
  • Figure 3: Heat map of the distribution of the best space and best time complexities for 118 problem families.
  • Figure 4: Distribution of average yearly improvement rates for 118 problem families, as calculated based on asymptotic space complexity, for problems of size: (a) $n =$ 1 thousand, (b) $n =$ 1 million, and (c) $n =$ 1 billion. Both DRAM yearly improvement rates were calculated using DRAM data from Hennessy and Patterson computerarchitecture.
  • Figure 5: Time-Space Tradeoffs