Just another site

gcc optimizations.

Today I spent trying to compare how fast different algorithms for calculating the van Rossum metric run; I ran sample code compiled using the -O3 flag in gcc. I have never known how these optimization settings work, but today I was profiling the code using gprof and was amazed to see how in-line the code is when optimized, the length of the gprof output is determined in part by how many function calls there are, the output is 163 lines with -O3 and 1042 without.


Single Post Navigation

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: