Sunday, May 31, 2009

The Price of Abstraction

The purpose of using using higher level programming languages is to be able to use higher level of abstraction in order to make code more readable and reusable. However, added levels of abstraction usually results in loss of efficiency (speed, memory or both).

This posting is a small case study on three different programming languages (OCaml, Scala and C++) comparing this hit on the running time as the level of abstraction and genericity increases. To highlight the overhead I chose a task which is CPU bound an where the relative overhead of abstraction (when introduced) is as high as possible. So this example can be viewed as a kind of worst case scenario.

The results can be read here

Thursday, May 21, 2009

A Spiritual Explanation to the Fermi Paradox

Where are our extraterrestrial friends? - asks the Fermi paradox.

If there are other intelligent civilizations, should not we have detected at least one of them?

According to the current state of astronomy, earth is relatively young. There are a lot of earth-like planets and several of them must be much older then ours. Just in our galaxy, there should be billions of them. Even if only a few civilizations would have managed to spread, they should be much more advanced than ours and be easily detectable by our equipments.

Still, we have not detected anything. Why?

Of course the most obvious explanation is that there are no interstellar civilizations in our vicinity. Maybe not one in our galaxy. Why is this strange? If only one single advanced civilization would have preceded us, it would probably be able to spread by 1/100th of the speed of light. Assuming that the colonization of a planet and setting up factories to produce star ships takes around 1000 years, it would have taken a couple of millions of years to spread to and colonize most of the Milky Way. This sounds like a lot of time, but even 100 millions of years are just 2% of the lifetime of the Earth. Since there are a lot of earth-like planets in our galaxy, a lot of them twice as old as our planet, should not we see traces of extremely advanced civilizations spread across our galaxy?

The most popular answers to this questions are the following:

1) It's highly improbably for intelligent life to emerge
2) If civilizations reach a certain sophistication, the risk of self destruction (by wars, runaway bio/nanotechnology.) becomes very high.
3) Advanced civilizations are hard to detect.

Can there be other explanations besides the above? Here, I elaborate on a fourth hypothesis.

First, just revisit the human history. The basic underlying principle of our world view was always human centered: that our species fulfills a special important purpose and that we are somehow important and valuable in the grand scheme of things. Our science and religions always assumed that we and our planet is somehow central. As our knowledge grew, it turned out that it was wishful thinking. We thought our planet to be the center of the universe, then we moved to a heliocentric view. Later we assumed our solar system to be near to the center of our galaxy.

It turned out to be incorrect all along: Our place in Universe seems to be completely random and insignificant. In fact, our planet is just a piece of dust compared to our own galaxy, which is only one of many billions.

Of course, we still did not give up our pioneering spirit: humanity still believes in conquering the skies and thinks of our Universe as a God-given playground for us.

However, as our science and knowledge progresses, we may learn a lot about our Universe. Maybe there is some real purpose to its existence. Maybe there is a creator or just some deep and important meaning to our physics which we will be able to decipher some day. If humanity will somehow survive the next centuries, we will get much closer to see some patterns and get a lot of explanations to the very nature of our Universe.

What are the chances that we were utterly wrong about the role we play?

Can't it be that we are just some random artifacts, not just irrelevant but even contra-productive to the real purpose of our world? What if we recognize that we are just parasites in a beautifully constructed machine which has a well-defined and decipherable purpose?

After progressing awhile, we may reach a certain technical and spiritual excellence, where we are not only clever and resourceful, but also wise. What would our wisdom tell us, if we recognize that we are just a fluke in a fantastic and beautiful entity.

What would humanity do if it recognizes that our role here is just that of a virus infecting an otherwise healthy and magnificent organism?

Would we still want to spread, if we would recognize we are nothing but cancer?

Who knows, maybe these were the questions that our hypothetical advanced and wise extraterrestrial friends had to ask themselves at some point back in time...