efficiency

CppCon 2015 string_view--Marshall Clow

Have you registered for CppCon 2016 in September? Don’t delay – Registration is open now.

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

string_view

by Marshall Clow

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

The library fundamentals TS contains a new class "string_view", which appears to be unlike anything else in the standard library. In this talk, we will explore the uses of string_view, when it is appropriate to use it, and when it is not. Along the way, I will discuss other possible "_view" classes, with an eye to the upcoming "ranges" proposal before the standards committee.

CppCon 2015 Pruning Error Messages From Your C++ Template Code--Roland Bock

Have you registered for CppCon 2016 in September? Don’t delay – Registration is open now.

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

Pruning Error Messages From Your C++ Template Code

by Roland Bock

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Many template libraries are regarded with ambivalent feelings by developers: On the one hand, such libraries can offer wonderful functionality. On the other hand, they are dreaded for the sheer amount of error messages spilled out by the compiler when there is even a small bug in the developer's code. This talk will demonstrate several techniques to drastically reduce the amount of compiler output in case of errors (with real-life examples, of course).

CppCon 2015 Demystifying Floating Point--John Farrier

Have you registered for CppCon 2016 in September? Don’t delay – Registration is open now.

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

Demystifying Floating Point

by John Farrier

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Every day we develop software that relies on math while we often overlook the importance of understanding the implications of using our IEEE floats. From the often cited “floating point error” to unstable algorithms, this talk will explain the importance of floats, understanding their storage, the impact of the IEEE floats on math, and designing algorithms better. Finally, the talk will conclude with a quick case study of storing time for games and simulations.

Top 15 C++ Exception handling mistakes and how to avoid them--Deb Haldar

This article changed my vision about exceptions:

Top 15 C++ Exception handling mistakes and how to avoid them

by Deb Haldar

From the article:

Do you use exception handling in your C++ code?

If you don’t, why not?

Perhaps you’ve been conditioned to believe that exception handling is bad practice in C++. Or maybe you think that it’s prohibitively expensive in terms of performance. Or maybe it’s just not the way your legacy code is laid out and you’re stuck in the rut.

Whatever your reason is, it’s probably worth noting that using C++ Exceptions instead of error codes has a lot of advantages. So unless you’re coding some real-time or embedded systems, C++ exceptions can make your code more robust, maintainable and performant in the normal code path (yes performant, you read that right !).

In this article we’re going to look at 15 mistakes that a lot of developers make when just stating off with C++ exceptions or considering using C++ exceptions...

CppCon 2015 Programming with less effort C++: Measuring the programming effort...--Sylvain Jubertie

Have you registered for CppCon 2016 in September? Don’t delay – Registration is open now.

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

Programming with less effort C++: Measuring the programming effort with metrics

by Sylvain Jubertie

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

The C++ language and libraries propose different ways to implement codes. For example, using explicit loops or STL algorithms to traverse containers and process data. C++11&14 bring also new features to the C++ language aimed at simplifying the writing of codes. But what is the gain we can expect in term of development effort when using these different possibilities and features ? or, as a developer may ask himself: Is it viable for me to spend some time learning new C++ libraries or standards to provide less effort/spend less time on my future codes ?

Before answering these questions, we must give a definition of the development effort, and define a way to measure it. Thus, we first propose to describe existing software metrics, from the simple Single Line Of Code (SLOC) to the more complex Halstead metrics, then to implement them in an automatic tool based on Clang tools, and finally to apply them on several codes to compare their respective development efforts.

First results show that using modern C++ features like auto, decltype and lambdas help to dramatically reduce the development effort. These results may help to convince developers to use new C++ features, or to port their codes from old standards to new ones, or even switch from other languages to C++ !

CppCon 2015 `for_each_argument` explained and expanded--Vittorio Romeo

Have you registered for CppCon 2016 in September? Don’t delay – Registration is open now.

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

`for_each_argument` explained and expanded

by Vittorio Romeo

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

During January 2015, Sean Parent posted a very interesting short piece of code on Twitter. The code iteratively iterates at compile-time over any number of function arguments, forwarding them one by one to a callable object.

How does this code work? What are the possible use cases? Can we make it even more generic and useful?

My talk answers all of the questions above, using independently compiled chronologically sequential code segments that show the audience the analysis and improvement process of `for_each_argument`.

How Bloomberg is Advancing C++ at Scale--John Lakos

Interesting interview:

How Bloomberg is Advancing C++ at Scale

by John Lakos

From the article:

John Lakos manages the Bloomberg Development Environment group, which offers a set of C++ software libraries, development tools, and methodology to well over a thousand Bloomberg developers. He is an authority on large-scale C++ software infrastructure, receiving recent acclaim for two publications by Pearson Education on methodology for industrial software development [Part 1, Part 2]. BDE and its libraries are open source and can be found on GitHub. In this conversation, Lakos discusses the importance of instilling process and discipline in all software development projects...

CppCon 2015 std::allocator Is to Allocation what std::vector Is to Vexation--Andrei Alexandrescu

Have you registered for CppCon 2016 in September? Don’t delay – Registration is open now.

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

std::allocator Is to Allocation what std::vector Is to Vexation

by Andrei Alexandrescu

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

std::allocator has an inglorious past, murky present, and cheerless future. STL introduced allocators as a stop gap for the now antiquated segmented memory models of the 1990s. Their design was limited and in many ways wasn't even aiming at helping allocation that much. Because allocators were there, they simply continued being there, up to the point they became impossible to either uproot or make work, in spite of valiant effort spent by the community.

But this talk aims at spending less time on poking criticism at std::allocator and more on actually defining allocator APIs that work.

Scalable, high-performance memory allocation is a topic of increasing importance in today's demanding applications. For such, std::allocator simply doesn't work. This talk discusses the full design of a memory allocator created from first principles. It is generic, componentized, and composable for supporting application-specific allocation patterns.

CppCon 2015 Lessons in Sustainability: How to Maintain a C++ Codebase for Decades--Titus Winters

Have you registered for CppCon 2016 in September? Don’t delay – Registration is open now.

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

Lessons in Sustainability: How to Maintain a C++ Codebase for Decades

by Titus Winters

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Google maintains (we believe) the largest monolithic C++ codebase in the world with over 100M lines of C++ code. Early commits to this repository date back to the late 1990s. About 4000 engineers submit at least one change in C++ every week. We’ve learned a few things about what it takes to maintain a codebase at this scale.

In this talk I’ll present some of the lessons we’ve learned over the years with respect to policies, technology, education, design, and maintenance of a long-lived monolithic codebase.

Cppcheck-1.75 has been released--Daniel Marjamäki

A new version is here!

Cppcheck-1.75 has been released

by Daniel Marjamäki

From the article:

General changes:

  • Replaced internal preprocessor by the brand-new preprocessor 'simplecpp'
  • Improved Windows installer: Install a copy of the license instead of asking to accept it
  • The Windows x64 binaries are now compiled with profile guided optimization, resulting in a speedup of 11%
  • Improved manual, especially the chapter about Libraries
  • Improved CWE mapping
  • --append is deprecated and will be removed in 1.80...