20 Aug 2004 lukeg   » (Master)

Onward!

I'm not luke@bluetail.com anymore, but I'm still @member.fsf.org.

ncm: Hi! I just noticed that you work at ITA Software. I have a question that you might be able to help me with, about this part of the article on paulgraham.com:

    9. We can do 10 seconds of Lisp computation on a 800mhz box and cons less than 5k of data. This is because we pre-allocate all data structures we need and die on queries that exceed them. This may make many Lisp programmers cringe, but with a 250 meg image and real-time constraints, we can't afford to generate garbage. For example, rather than using cons, we use "cons!", which grabs cells from an array of 10,000,000 cells we've preallocated and which gets reset every query.
I don't understand the CONS! bit. Doesn't this have the same performance characteristics as using a generation-scavenging collector with a 10MB nursery, forcing a GC between requests ("for free" because the nursery is pure garbage), and aborting if a GC is triggered before the request ends? Why don't you do it that way?

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!