← All stories
● Covered by 1 source · 1 reportLow impact1 neutral

Unix spell checker fit dictionary into 64KB RAM using data structures and compression

🔄 Updated 1d ago
New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • Unix spell checker fit 250KB dictionary into 64KB RAM.
  • Douglas McIlroy used linguistic stemming to reduce dictionary size.
  • Early Bloom filter implementation by Dennis Ritchie was used for lookups.
  • Custom hash compression with Golomb's code achieved near-optimal compression.

The Challenge of Limited Memory

In the 1970s, Douglas McIlroy faced the task of implementing a spell checker for Unix on a PDP-11 computer, which had a memory constraint of just 64KB RAM. The dictionary alone was 250KB, making it a significant challenge to store and access efficiently within the available memory.

Linguistic Stemming and Bloom Filters

McIlroy's initial innovations included a linguistics-based stemming algorithm that reduced the dictionary to 25,000 words while improving accuracy. For fast lookups, he employed a Bloom filter, an early production use of the data structure, with an implementation provided by Dennis Ritchie. This allowed for a low false positive rate, often bypassing full dictionary lookups.

Innovative Hash Compression

As the dictionary grew to 30,000 words, the Bloom filter approach became impractical. McIlroy then developed innovative hash compression techniques. He computed that 27-bit hash codes were needed for acceptable collision probability and devised a method to store differences between sorted hash codes, which followed a geometric distribution.

Golomb's Code for Optimal Compression

Using Golomb's code, a compression scheme suited for geometric distributions, McIlroy achieved 13.60 bits per word, remarkably close to the theoretical minimum of 13.57 bits. He further partitioned the compressed data to speed up lookups, resulting in a final memory footprint of approximately 14 bits per word for improved performance.

✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →

The daily brief

One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.

One email a day. Unsubscribe in one click, any time.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~7 min · 6 stories · Aug 15

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

Reporting from

The original Unix spell checker, developed in the 1970s by Douglas McIlroy, managed to fit a 250KB dictionary into 64KB of RAM on a PDP-11 computer. This was achieved through linguistic stemming, early use of Bloom filters, and a custom hash compression algorithm that approached the theoretical compression limit. The engineering methods used demonstrate how to solve problems under strict resource constraints.