Vector of Objects vs Vector of Pointers Updated

In one of my previous post I wrote about performance differences between using vector<Obj> and vector<shared_ptr<Obj>>. Somehow I knew that the post is a bit unfinished and need some more investigation. This time I will try to explain memory access patterns used in my code and why performance is lost in some parts.

READ MORE...

Vector of object vs Vector of pointers

After watching some of the talks from Build 2014 - especially “Modern C++: What You Need to Know” and some talks from Eric Brumer I started thinking about writing my own test case. Basically I’ve created simple code that compares vector<Obj> vs vector<shared_ptr<Obj>> The first results are quite interesting so I thought it is worth to describe this on the blog.

READ MORE...