Unexpected stuff!

Let’s have a look at this code: int main() { for(int i{0};i<500;i++) { std::cout<<“This is a big number: “<<i*20000000<<std::endl; } } And let’s compile it with g++ using the flag -O3, what’s going to happen? Before answering, let’s have a look at the assembly, shall we? L16: movsbl 39(%ebx), %eax L6: movl %esi, %ecx movl… Continue reading Unexpected stuff!

Almost useless knowledge

Is almost useless because nobody is going to raise yours salary for that! Or maybe someone will?!? Let’s say we ignore all the benefits of all the optimizations our benevolent compiler is going to made on our code, and have a look at what happen when we execute some hundreds of thousands of times two very… Continue reading Almost useless knowledge

Solution space.

Certain problems required us to try all the possible solutions to find the one that best fit the given constraint, a very popular brute force way is to perform a complete search of the solution space by iterating over and over the data and changing each time the input variables. If the problem require to… Continue reading Solution space.

Suffix trees.

An entire post covering both the theoretical part and the implementation is going to take too long, for this reason I’m splitting the material in two parts: A post with some theory introduction, and one post which will be focused on implementation details. The algorithm I would like to show you is the Ukkonen method for… Continue reading Suffix trees.

Sorry, this item can’t be shipped to your selected address.

Since I’m having some hard time in understanding the implementation of all the on-line algorithms for the construction of suffix-tree, I decided to move on buying some additional books which supposedly are going to cover more clearly those topics. Technical books are outrageously expensive, and when you think you’re able to save some money by… Continue reading Sorry, this item can’t be shipped to your selected address.

Coming back to normality.

The last two weeks were pretty unusual, Magda moved to my apartment in Gdansk because finally she found a job here. She had her first day at work last week, at the beginning going to work was problematic since she knew nobody at the office which could pick her up and the only way to reach… Continue reading Coming back to normality.

Short summary of our holiday.

I’m back in Poland, with a bag full of wine, cheese and a good quantity of prosciutto! Watching out of my office window the first thought running in my mind is “How the hell can I live in a place so cold?!?”, from +20 to -2, from running under the sun in Santa Severa to walking to my… Continue reading Short summary of our holiday.