igoro.com
Gallery of Processor Cache Effects
http://igoro.com/archive/gallery-of-processor-cache-effects
On programming, technology, and random things of interest. Gallery of Processor Cache Effects. 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. The examples are in C#, but the language choice has little impact on the performance scores and the conclusions they lead to.
igoro.com
C#
http://igoro.com/archive/category/csharp
On programming, technology, and random things of interest. Volatile keyword in C# memory model explained. Igor Ostrovsky on February 23rd, 2010. The memory model is a fascinating topic it touches on hardware, concurrency, compiler optimizations, and even math. The memory model defines what state a thread may see when it reads a memory location modified by other threads. For example, if one thread updates a regular non-volatile field, it is possible that another thread reading […]. Using System.Collec...
igoro.com
Algorithms
http://igoro.com/archive/category/algorithms
On programming, technology, and random things of interest. How RAID-6 dual parity calculation works. Igor Ostrovsky on September 29th, 2014. Parity protection is a common technique for reliable data storage on mediums that may fail (HDDs, SSDs, storage servers, etc.) Calculation of parity uses tools from algebra in very interesting ways, in particular in the dual parity case. This article is for computer engineers who would like to have a high-level understanding of how the […]. Data structure zoo: order...
igoro.com
Volatile keyword in C# – memory model explained
http://igoro.com/archive/volatile-keyword-in-c-memory-model-explained
On programming, technology, and random things of interest. Volatile keyword in C# memory model explained. Is a fascinating topic it touches on hardware, concurrency, compiler optimizations, and even math. The memory model defines what state a thread may see when it reads a memory location modified by other threads. For example, if one thread updates a regular non-volatile field, it is possible that another thread reading the field will never. Set loop to false on another thread. Test1 loop = false. This ...
igoro.com
Use C# dynamic typing to conveniently access internals of an object
http://igoro.com/archive/use-c-dynamic-typing-to-conveniently-access-internals-of-an-object
On programming, technology, and random things of interest. Use C# dynamic typing to conveniently access internals of an object. Sometimes you need to access private fields and call private methods on an object for testing, experimentation, or to work around issues in third-party libraries. As a simple example, I’ll show you how to access internals of the List T class from the BCL standard library. Let’s create an instance of the List int type:. Read a private field - prints 0. Add a value to the list.
igoro.com
Numbers that cannot be computed
http://igoro.com/archive/numbers-that-cannot-be-computed
On programming, technology, and random things of interest. Numbers that cannot be computed. 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:. Similarly, you can write programs that will print the infinite decimal expansion of any rational number, sqrt(2), any algebraic number. You would compute π to greate...
igoro.com
Misc
http://igoro.com/archive/category/misc
On programming, technology, and random things of interest. 7 tips for extending browser functionality to Silverlight apps. Igor Ostrovsky on June 1st, 2009. Silverlight 2 is an awesome platform for development of rich web applications. One issue to be aware of, though, is that some browser features do not extend into Silverlight apps. For example, the Back and Forward browser buttons do not always work as the user may expect with Silverlight apps. The set of browser features […]. Windows Live Writer is a...
igoro.com
Cool Stuff
http://igoro.com/archive/category/cool-stuff
On programming, technology, and random things of interest. Is two to the power of infinity more than infinity? 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 […]. Graphs, trees, and origins of humanity.
igoro.com
Graphs, trees, and origins of humanity
http://igoro.com/archive/graphs-trees-and-origins-of-humanity
On programming, technology, and random things of interest. Graphs, trees, and origins of humanity. 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. As you might guess, today there would be only one. Secret word in circulation. After six generations, the last name shown as green is the only last name a...
igoro.com
Uncategorized
http://igoro.com/archive/category/uncategorized
On programming, technology, and random things of interest. Why computers represent signed integers using two’s complement. Igor Ostrovsky on August 24th, 2010. If you had to come up with a way to represent signed integers in 32-bits, how would you do it? One simple solution would be to use one bit to represent the sign, and the remaining 31 bits to represent the absolute value of the number. But as many intuitive solutions, this one is not […]. Igor Ostrovsky on April 2nd, 2010. Around two weeks ago, I f...