C++ Performance: Prefer pre-increment to post-increment

In this post, I will try to figure out what is the perfomance difference between pre-increment and post-increment.

Read More

C++ Performance: Prefer C++11 auto and for loop to old-fasion iterator loop

In this post, I will try to figure out what is the perfomance difference between auto-for loop introduced since C++11 and old-fasion iterator.

Read More

C++ Performance: Cache Friendly(3) Using row major when iterating 2D array

In this post, I will try to use a linear searching algorithm based on linked list to show the effect to performance when data layout is different. First experiment I will use to create a linked list in a normal way which creates each node using new keyword. Second one I will create a linked list based on a consectutive memory space. and the size of Node is the same.

Read More

C++ Performance: Cache Friendly(2) Compact the discrete data as much as possible

In this post, I will try to use a linear searching algorithm based on linked list to show the effect to performance when data layout is different. First experiment I will use to create a linked list in a normal way which creates each node using new keyword. Second one I will create a linked list based on a consectutive memory space. and the size of Node is the same.

Read More

C++ Performance: Cache Friendly(1) Keep your structure as small as possible

In this post, I will try to use a linear searching algorithm based on linked list to show the effect to performance when the size of the node is different. According to the locality theory (spatial locality), the better locality is, the faster your application will be. And the samller your structure is, the higer cache hit ratio is. And I use Vtune to measure the cache hit or miss ratio. By the way this is an experiment, so I did not care about the memory leaking.

Read More

2017
Card image cap

EthanHao

Being fear of something means something

  • Location: Chicago
  • Degree: Master of DePaul University
  • Current GPA: 3.97
  • Email: ethanhaous@gmail.com
  • Phone: (312)532-4772