Taming the performance Beast - Klaus Iglberger - Meeting C++ 2015

By: Meeting C++ YT Kanalseite

53   5   3672

Uploaded on 08/02/2016

Taming the performance Beast
Klaus Iglberger
Meeting C++ 2015

Slides: https://meetingcpp.com/index.php/tv15/items/10.html
Meeting C++ 2016 Schedule: https://meetingcpp.com/index.php/schedule16.html

Comments (3):

By anonymous    2017-09-20

std::deque is a far better option. Or if you had benchmarked std::deque and found its performance to be inadequate for your specific use, you could implement a circular buffer in a fixed size array, storing the index of the start of the buffer. When replacing an element in the buffer, you would overwrite the element at the start index, and then set the start index to its previous value plus one modulo the size of the buffer.

List traversal is very slow, as list elements can be scattered throughout memory, and vector shifting is actually surprisingly fast, as memory moves on a single block of memory are quite fast even if it is a large block.

The talk Taming The Performance Beast from the Meeting C++ 2015 conference might be of interest to you.

Original Thread

By anonymous    2018-06-05

@shrpq It really depends what requirements you have for the container. If you only need to insert at the back as fast as possible, use [`std::stack`](http://en.cppreference.com/w/cpp/container/stack) or [`std::deque`](http://en.cppreference.com/w/cpp/container/deque). I recommend watching this talk about the performance of standard containers: https://www.youtube.com/watch?v=LrVi9LHP8Bk

Original Thread

Popular Videos 786

David Heinemeier Hansson

Submit Your Video

If you have some great dev videos to share, please fill out this form.