GCC 4.4.0 Released

GCC 4.4.0 was released on April 21st. Notable changes include fascinating new optimizations for loops. Particularly, they include the ability for the compiler to automatically rewrite loops to take into account memory layout of the system. I recall distinctly in my Intro to Data Structures CS class the teacher using the example of a two dimensional loop which iterated the “wrong way” (causing many disparate memory look ups and cache-misses) as a classic performance killer. Example (from GCC’s website), GCC is now able to perform the following optimization:



Automated Algorithm Analysis Using GNU Octave

Jon and I were discussing the minnow scheduler and I suggested to him that it might be possible to use GNU Octave to run an automated analysis of his code and determine how well it will scale as the number of messages sent increases. The general notion is to use application run times to try and determine if the application has exponential, linear, polynomial, or logarithmic complexity. We can characterize the runtime of a function using regression analysis to generate a polynomial that represents our data and comparing the properties of the generated function to the known algorithm complexities we are concerned about. Specifically, we will be looking at the acceleration (2nd derivative) and jerk (3rd derivative) of our function. Positive acceleration means that the each unit of work performed takes longer to execute than the previous unit took. Positive jerk means that the acceleration is increasing, which is very bad. The characteristics are as follows:



Inform 7

The Inform 7 interactive fiction system parses human readable English assertions and builds an interactive system from your statements. I have only played with it briefly, but take the following example:



xkcd: 1000 Times

I was reminded of a recent xkcd comic while installing Inform 7 today: [img_assist nid=401 title=Inform 7 Installer desc= link=popup align=none width=640 height=500] (yellow highlight [poorly] added by me). This is not a knock against Inform’s installer, I’ve noticed it several times lately.


The Value of Open Source Experience

Jeff at Coding Horror recently asked, “Is Open Source Experience Overrated?” I think his question was asked a bit tongue-in-cheek, but it is something I had been pondering lately and was already considering writing about.



When to use class vs. typename in a Template Declaration

When declaring a template you can choose either “class” or “typename” for a template parameter. Example:



Rest in Peace, Regen.

This Monday I had to put down my 11 year old Rottweiler. She had just turned 11 this week, in fact. For nearly 1.5 years now we had struggled with her health. She had been a picky eater for most of her life but had gotten much worse about it, so my wife started making her homemade food. She would take a new food for a few days and quickly start refusing it, which made feeding her very difficult.



Project Euler - Problem 1 - Sum All Integers Below 1000 and Divisible By 3 or 5

The first Project Euler problem is to calculate the sum of all integers below 1000 which are divisible by either 3 or 5. My solution is implemented entirely in C++ templates. The value is recursively calculated at compile time. The template specialization struct Problem1<0> stops the recursion and returns 0. To compile this code with gcc you must expand the maximum allowed template recursion depth to at least 1000. ` g++ EulerProblem1.cpp -ftemplate-depth-1000`



Project Euler - Programming Math Problems

Project Euler presents a rather extensive list of problems which require a combination of programming skills and math skills to solve.



Portable Ubuntu for Windows

The Portable Ubuntu for Windows team has made available an Ubuntu distribution that runs fully inside of Windows using the coLinux kernel. The concept is fascinating, but it does fall down in a few places. First of all, on my Acer Aspire One, it takes a very long time to get started, which is probably fair because it is starting up an entire OS inside of the current one. Also, it seems to use a significant amount of RAM. This causes a lot of swapping on this 1G machine. Finally, the recent news about the project is related to some documentation updates, not to a new release. The currently available release is from mid last year and is of Ubuntu 804.