logoalt Hacker News

rented_muletoday at 2:16 PM3 repliesview on HN

20 years ago, I was working on a consumer device, doing indexing and searching of books. The indexer had about 1 MB of RAM available, and had to work in the background on a very slow, single core CPU, without the user noticing any slowdown. A lot of the optimization work involved trying to get algorithmic complexity and memory use closer to a function of the distinct words in books than to a function of the total words in books. Typical novels have on the order of 10 K distinct words and 100 K total words.

If you're indexing numbers, which we did, this book has little difference between total words and distinct words because it has so many distinct numbers in it. It ended up being a regular stress test to make sure our approach to capping memory use was working. But, because it constantly triggered that approach to capping memory usage, it took far longer to index than more typical books, including many that were much larger.


Replies

nereyetoday at 2:41 PM

Over 30 years ago, was working on a presentation software that shipped with a bunch of (vector) clip art and remember using the (raster) graphics from the CIA World Factbook as a base to create vector (WMF) versions of the flags of various ‘new’ countries at the time (following the breakup of Yugoslavia) that were missing from the set that our art vendor provided to us.

The Croatia flag in particular took quite a while to trace/draw (by hand).

nannatoday at 2:34 PM

Bit confused, what's this to do with the CIA World Factbook?

show 1 reply