Cool Stuff

Igor Ostrovsky on April 21st, 2011

Do you know whether this inequality is true? It’s a simple question, but with an intriguing and revealing answer. Infinity #1 One concept of infinity that most people would have encountered in a math class  is the infinity of limits. With limits, we can try to understand 2∞ as follows: The infinity symbol is used […]

Continue reading about Is two to the power of infinity more than infinity?

Igor Ostrovsky on July 2nd, 2010

Imagine that 90,000 years ago, every man alive at the time picked a different last name. Assuming that last names are inherited from father to son, how many different last names do you think there would be today? It turns out that there would be only one last name! Similarly, imagine that 200,000 years ago, […]

Continue reading about Graphs, trees, and origins of humanity

Did you know that the performance of an if-statement depends on whether its condition has a predictable pattern? If the condition is always true or always false, the branch prediction logic in the processor will pick up the pattern. On the other hand, if the pattern is unpredictable, the if-statement will be much more expensive. […]

Continue reading about Fast and slow if-statements: branch prediction in modern processors

Igor Ostrovsky on March 12th, 2010

The story of how GPU came to be used for high-performance computation is pretty cool. Hardware heavily optimized for graphics turned out to be useful for another use: certain types of high-performance computations. In this article, I will explore how and why this happened, and summarize the state of general computation on GPUs today. Programmable […]

Continue reading about How GPU came to be used for general computation

Igor Ostrovsky on February 9th, 2010

As a software developer, you certainly have a high-level picture of how web apps work and what kinds of technologies are involved: the browser, HTTP, HTML, web server, request handlers, and so on. In this article, we will take a deeper look at the sequence of events that take place when you visit a URL. […]

Continue reading about What really happens when you navigate to a URL

Igor Ostrovsky on January 19th, 2010

Most of my readers will understand that cache is a fast but small type of memory that stores recently accessed memory locations.  This description is reasonably accurate, but the “boring” details of how processor caches work can help a lot when trying to understand program performance. In this blog post, I will use code samples […]

Continue reading about Gallery of Processor Cache Effects

Igor Ostrovsky on September 24th, 2009

Did you ever see one of those auto-generated random “academic papers” like this one? When I first saw the following title, my first thought was that it is a randomly-generated “paper”: Implications of the Turing completeness of reaction-diffusion models, informed by GPGPU simulations on an XBox 360: Cardiac arrhythmias, re-entry and the Halting problem [PDF] […]

Continue reading about Human heart is a Turing machine, research on XBox 360 shows. Wait, what?

Igor Ostrovsky on October 31st, 2008

As promised at the end of my recent post, I am going to explain how to implement a program that prints itself, in addition to doing other things (like playing Game of Life). A self-printing program – also called a quine – is a program that prints out its own source code. I will describe […]

Continue reading about How to write a self-printing program

Igor Ostrovsky on October 30th, 2008

Conway’s Game of Life has fascinated computer scientists for decades. Even though its rules are ridiculously simple, Conway’s universe gives rise to a variety of gliders, spaceships, oscillators, glider guns, and other forms of “life”. Self-printing programs are similarly curious, and – rather surprisingly – have an important place in the theory of computation. What […]

Continue reading about Self-printing Game of Life in C#

Igor Ostrovsky on October 18th, 2008

Did you know that there are numbers that cannot be computed by any computer program? It is weird, but true. And by number, I mean just an ordinary real number. As a perhaps unnecessarily simple example, the result of the division 1/7 looks like this:         0.1428571428571428571428571428571414285714285714285714285714285714… We can easily implement a program that prints […]

Continue reading about Numbers that cannot be computed