July 2015

CppCon 2014 Efficiency with Algorithms, Performance with Data Structures--Chandler Carruth

Have you registered for CppCon 2015 in September? Don’t delay – Early Bird registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2014 for you to enjoy. Here is today’s feature:

Efficiency with Algorithms, Performance with Data Structures

by Chandler Carruth

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Why do you write C++ code? There is a good chance it is in part because of concerns about the performance of your software. Whether they stem from needing to run on every smaller mobile devices, squeezing the last few effects into video game, or because every watt of power in your data center costs too much, C++ programmers throughout the industry have an insatiable desire for writing high performance code.

Unfortunately, even with C++, this can be really challenging. Over the past twenty years processors, memory, software libraries, and even compilers have radically changed what makes C++ code fast. Even measuring the performance of your code can be a daunting task. This talk will dig into how modern processors work, what makes them fast, and how to exploit them effectively with modern C++ code. It will teach you how modern C++ optimizers see your code today, and how that is likely to change in the coming years. It will teach you how to reason better about the performance of your code, and how to write your code so that it performs better. You will even learn some tricks about how to measure the performance of your code.

New Concurrency Features in C++14 -- Anthony Williams

Anthony Williams describes shared locking in his recent blog post.

New Concurrency Features in C++14

by Anthony Williams

From the article:

It might have been out for 7 months already, but the C++14 standard is still pretty fresh. The changes include a couple of enhancements to the thread library, so I thought it was about time I wrote about them here.

The biggest of the changes is the addition of std::shared_timed_mutex. This is a multiple-reader, single-writer mutex. This means that in addition to the single-ownership mode supported by the other standard mutexes, you can also lock it in shared ownership mode, in which case multiple threads may hold a shared ownership lock at the same time.

This is commonly used for data structures that are read frequently but modified only rarely. When the data structure is stable, all threads that want to read the data structure are free to do so concurrently, but when the data structure is being modified then only the thread doing the modification is permitted to access the data structure.

 

CppCon 2014 The Committee Experience--Alisdair Meredith

Have you registered for CppCon 2015 in September? Don’t delay – Early Bird registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2014 for you to enjoy. Here is today’s feature:

The Committee Experience

by Alisdair Meredith

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

What happens behind the closed doors of the ISO Standard Committee? And just how closed are they?

The session collects some anecdotes and relates what it is like to get involved in the process of standardizing C++, from the perspective of someone attending their first meeting - me 10 years ago! - to now. We will hear some of the highs and lows along the way to C++11, some misconceptions of what might be involved, and get some idea of what happens during a typical standard meeting, and between.

By the end you will have some idea of how the standard itself is actually formed, and hopefully spark the interest of folks who might be interested in getting involved themselves...

Cache-friendly binary search--Joaquín M López Muñoz

An interesting approach to sorted search:

Cache-friendly binary search

by Joaquín M López Muñoz

From the article:

High-speed memory caches present in modern computer architectures favor data structures with good locality of reference, i.e. the property by which elements accessed in sequence are located in memory addresses close to each other. This is the rationale behind classes such as Boost.Container flat associative containers, that emulate the functionality of standard C++ node-based associative containers while storing the elements contiguously (and in order)...

CppCon 2014 cppreference.com: documenting C++ one edit at a time--Nate Kohl

Have you registered for CppCon 2015 in September? Don’t delay – Early Bird registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2014 for you to enjoy. Here is today’s feature:

cppreference.com: documenting C++ one edit at a time

by Nate Kohl

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

How do you convert hundreds of pages of C++ standardese into a resource that is accessible to software engineers around the world? This talk will describe the process of building a community-run website that documents all of the nooks and dark corners of the C++ programming language. I'll look back at the history of how C++ was defined, cover the current state of documentation, examine the pros and cons of running a fairly high-profile publicly-editable wiki, and try to guess at what the future holds.

Bitesize Modern C++: nullptr--Glennan Carnie

An article about the null value of a pointer:

Bitesize Modern C++: nullptr

by Glennan Carnie

From the article:

What’s the value of a null pointer?

  • 0
  • NULL
  • NUL

No doubt you’ve been involved in the (always heated) discussions about which is the correct one (By the way, if you said NUL you need to take yourself to one side and give yourself a stern talking to)...

Fun with Lambdas: C++14 Style (Part 4)—Sumant Tambe

More rapid-fire “now write this using lambdas” problem-solution drill with Sumant Tambe:

Fun with Lambdas: C++14 Style (Part 4)

by Sumant Tambe

From the article:

C++14 has a number of features that support functional-style design. By "functional-style" I mean heavy use of higher-order functions (functions that take other functions as arguments). Quite often arguments to the higher-order functions are lambdas (closures, to be precise). With automatic return type deduction for normal functions, writing higher-order function becomes very easy and seamless in C++14...

Set-up and tear-down--Andrzej Krzemieński

Today, you have an article about a specific aspect of unit-testing:

Set-up and tear-down

by Andrzej Krzemieński

From the article:

Recently as part of program run-time performance optimization effort, I was scanning through the code for occurrences of keyword new. The goal was to find unnecessary memory allocations. I was surprised to find most of news in the unit test module. Not that there was any particular need for memory allocation: it is just that the framework that was chosen (a fairly popular one) enforces on the programmers bad practices of manually controlling the life-time of their objects...