Hacker News new | comments | show | ask | jobs | submit login
Sleep is Garbage Collection (discovermagazine.com)
57 points by soundsop on Apr 5, 2009 | hide | past | web | favorite | 29 comments

If sleep is garbage collection, can I switch back to old malloc/free? So I can do it more evenly over the day? :)

Modern garbage collection is done more evenly:


Perhaps the brain could do something similar.

In software, optimizing this type of garbage collection for low pauses usually results in reduced application throughput. Evolution in general clearly does not favor "low pause" sleep patterns.

However, there are anecdotes of rare people that subsist on "low pause" sleeping. Allegedly, Thomas Edison had a 24 word day and frequently cat-napped. Contrast that with Einstein who allegedly slept 10 hrs a night.

For modern garbage collection systems (e.g. the JVM), there is no single setting that is best (or even acceptable) for all applications. The same is probably true for sleep patterns.

Evolution in general clearly does not favor "low pause" sleep patterns.

Evolution does not consider every possibility. And when it does consider one, it doesn't necessary "implement" it well.

Well, if the genes regulating sleep patterns are half as tedious as the gc params for the 1.4.2 JVM, I wouldn't want to consider every possibility either:P

How about switching from a dynamic late-binding brain to a much faster static typed compiled one?

(Or would that just render us faster, but much less flexible and adaptable?)

Watch out, you might run into some nasty memory leaks

I get memory leaks even with nightly garbage collection, or maybe I have bugs that collect the good stuff and leave the garbage.

Well, if this mechanism is the same in fruit flies and in humans, that implies that it's a pretty low-level kernel function.

We could change the source, but it might take several hundred million years to finish compiling your new biosphere. And in the meantime the old biosphere might well eat it for lunch. Literally!

Actually, yes. It is called polyphasic sleep:


I tried a 28-hour day for about a week: http://www.dbeat.com/28/

I'm glad I did solely because I know that if I hadn't I'd be wondering about both the 28-hour day and polyphasic sleep until I tried it, and I'd probably have more at stake if I tried it later.

It was not good. I tried it in the middle of working on my PhD. I could still write code, but the quality dipped a little. My theory work stopped - the whole abstract complex thought part of my brain shut off - and it took me a while to notice. There was some digestive confusion for a while as well - the body is a pretty complex thing, and it turns out that (at least mine) really likes it's cycles.

I made it through a week and a half - at least I think it was - it really throws your idea of what a day is. The abstract complex thought bit took a while to come back. It took about a month and a half to recover properly. Would not try again.

In yet another example, the overhead for automatic memory management is shown to be prohibitive.

The dominant species on earth (humans) sleep, the generally believed to be smartest animals sleep (humans, monkeys, dogs, various birds), the biggest (elephants, giraffes), the hunters (big cats), the hunted, herbivores, omnivores, the dominant type of fruit fly (in the article) sleeps. Even creatures that would drown if they went unconcious (dolphins, whales) have a kind of sleep.

What, exactly, has it prohibited?

Because we're currently the smartest animal, you suggest we couldn't be better if sleep were not required?

I do not suggest that. I merely ask you to support your jokey suggestion that the overhead of sleep is prohibitive when it doesn't seem to have prohibited ... anything.

If we didn't require sleep (and thus had 8 more hours each day we could work) we could produce far more as a race. It's not like it's some crazy suggestion, it's obviously true and unrealistic at the same time.

Beggars in Spain is an interesting treatment of that idea:


Without sleep, we would require one extra meal a day. A 133% eating rate is a significant increase in food required. You'll notice it when you stay up all night and it isn't adrenaline induced.

Subjects taking modafinil can go without sleep for weeks. And studies show no learning decrement in subjects taking modafinil. So is sleep truly required for humans?

Memory in humans and other animals may so different from that of fruit flies that drawing such a general conclusion as "Sleep is Garbage Collection." may not be valid.

Sleep = GC and more available synapses = smarter*

So smarter people need less sleep?

Is the converse true?

* http://www.telegraph.co.uk/scienceandtechnology/science/scie...

Do you mean that smart people need less sleep to be able to perform a particular task, or that smart people need less sleep to perform at their own peak?

The above analogy leads more naturally to the first conclusion. Give a smart person a cognitive task to perform, and gradually deprive him of sleep; eventually, his performance will be reduced to the level of the average person.

It's less clear how the second conclusion would hold -- that smart people are incrementally affected less by sleep loss than average people. In other words, a priori, I don't think there's much reason to believe that a smart person would be impaired less by losing an hour of sleep than an average person would.

I wasn't aiming to go that deep, but to answer your question I meant the ability to perform any given set of tasks.

Deriving the second conclusion needs a lot more data. Assuming there is no analog for swapping to disk, the biggest missing piece is the rate of GC. Is it the same for everyone? Additionally, is a given person's GC rate constant? When I go without sleep for two days, I usually need more sleep than when I missed sleeping for just a day. Does this mean there is more memory to reclaim? Or that my GC rate has been impaired? Or both?

More interestingly, how do 'brain-building' foods and activities affect sleep requirements?

I wouldn't think so. Your body is made up of more organs and systems than your brain.

Depending on how intensely I exercise, I need more sleep as it's repairing itself, so I think the answer to your questions is either 'probably not' or 'it depends'.

I know that in addition to all this, that apparently sleep also moves information in to your long term memory, and that in certain trades (military comes to mind), that after intense training excercises, it is encouraged if not enforced to get a 'good night's sleep' instead of 'getting stuck into the beers after a hard day's work' in order to properly 'store' what was learnt during the day.

So, if you want to remember stuff, get good a good night's sleep!

I need a lot of sleep, so I must be dumb.

I must have a very aggressive GC because my memory is all but worthless for everything besides code.

I have this too. I find it disturbing.

I always thought so,I think it does some defragging too.

Nice one on the title soundsop! Great summary of what the article is saying in terms that are familiar to us here :p

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact