Code Gem

Code Gem

Knowledge was arriving in dribs and drabs

Code Gem RSS Feed
 
 
 
 

Archive for October, 2008

Improved SyntaxHighlighter A Little For This Blog

I am using SyntaxHighlighter to make my code snippet looks pretty in this blog. It a very cool code highlight engine: 100% JavaScript based, no server side code needed, can deal with various languages, and have very nice features like collapse code by default to make the post looks clean for the first glance.
But it [...]

What did we pay for C++ Runtime Polymorphism: Part II

It seems that there is some misunderstanding about my previous post. The purpose was never for measuring C++ performance but for better understanding of how polymorphism is implemented in C++, and make people aware that those extra power is not come for free. This is why I choose trivial cases and disable compiler optimization. Trivial [...]

What did we pay for C++ Runtime Polymorphism: Part I

One of the most useful and interesting features in C++ is virtual function. With the feature we are allowed to postpone determining the behavior of an object till run time. This gives us great flexibilities as we now are able to think of an object in terms of what category of types it belongs to, [...]

Generate Assembly From C++ Code in Visual Studio

Sometimes we want to see the assembly code generated from a piece of C++ code. It could be very helpful for:

Better understanding about how compiler optimize our code
Better understanding about the dark side of the programming language that we are using to avoid the pitfalls.
Finding performance hints.
Debugging really tricky defects.

And I [...]

September 2010
M T W T F S S
« Feb «-»  
 12345
6789101112
13141516171819
20212223242526
27282930  

Blogroll