Live data from Hacker News

How Unix spell ran in 64kb RAM

blog.codingconfessions.com

1–10 of 53 posts

Re: How Unix spell ran in 64kb RAM

#2
Ah, the Good Old Days. Back when a bit of memory cost more than most butter churns, and the ultimate data transfer technology was a sharp Express rider with his saddlebags full of punch cards...

Back in the early 1980's, I recall futzing around a bit with dictionary compression algorithms. Very interesting - but it didn't take me long to conclude that outperforming `spell` wouldn't be easy. Nor worth the effort.

Re: How Unix spell ran in 64kb RAM

#6
Way too smart for worse is better. Think Worser!

The main memory bandwidth and the disk bandwidth were about the same, a little of 1MB/s.

I would have done this in multiple passes (but still used the Bloom Filters, those are cool).

https://github.com/arnoldrobbins/v10spell

https://code.google.com/archive/p/unix-spell/

The original paper is great https://www.semanticscholar.org/paper/Development-of-a-Spell...

It is hosted on his web page https://www.cs.dartmouth.edu/~doug/

https://en.wikipedia.org/wiki/Douglas_McIlroy

If you are a word nerd, you will have found obovate and there, this chart.

https://upload.wikimedia.org/wikipedia/commons/e/e8/Leaf_mor...

Re: How Unix spell ran in 64kb RAM

#7
in the mid 80's i ran into something similar. Fast is relative.

I had a lot of data, 640KB RAM, 64KB of heap, and 64KB of stack. I had hundreds of megabytes that I had to search extract data from and then combine some of them.

I experimented with data index structured into ternary trees. Conceptually it made sense, but implementation-wise the relationships and paths were still too big to keep in 64KB.

Instead of compression, I did swapping. I wrote a TSR (think service), a piece of code that would process a chunk of the data, extract the results, store it n the stack, dump the original data, make an interrupt call to the TSR, which in turn destroy the heap, and read in the next chunk from storage, return control to the program, process, combine with stack data, and continue until finished the entire process.

Originally this process took about a week for three data entry persons (think about a dozen 3" ring binders filled with tables), and an specialist combining the information. The program completed the work in just a few hours. It was amazingly "fast".

This was on a single threaded system.

[0] https://en.wikipedia.org/wiki/Terminate-and-stay-resident_pr...

Post reply on HN