performance

Native Code Performance on Modern CPUs: A Changing Landscape -- Eric Brumer

eric-brumer-build-2014.PNGThis C++ optimization talk is one of the highest-rated talks from last week's //build/ conference, and deservedly so.

Be prepared for deep content from a compiler optimizer architect, and quite a bit of subtle dry humor.

Native Code Performance on Modern CPUs: A Changing Landscape

by Eric Brumer
Compiler developer, Visual C++ team

Modern CPUs are fast. Really fast. New instructions, wider vector registers, and more powerful CPUs promise faster code. But reasoning about performance is not as it seems on the surface. This talk will dive deep into how advancements in the latest chips force some rethinking of native code performance, from the point of view of a compiler developer. The performance landscape is changing. Come see what that means.

Modern C++: What You Need to Know -- Herb Sutter

A recording of yesterday's //build/ talk by Herb Sutter is now available on Channel 9:

Modern C++: What You Need to Know

by Herb Sutter

This talk will give an update on recent progress and near-future directions for C++, both at Microsoft and across the industry. This is a great introduction to the current state of the language, including a glimpse into the future of general purpose, performance-intensive, power-friendly, powerful native programming.

From the advance description on Herb's blog:

I was asked to give a "foundational talk" about C++, and I decided that meant I should focus on addressing two questions that I get a lot these days:

  • FAQ #1 (1-2 slides): When should I use C++ compared to another language -- on all platforms in general, and on Microsoft platforms in particular?
  • FAQ #2 (lots of slides): What should I know about C++ if I’m a {Java|C#|JavaScript|Python|...} developer?

Even if you're a seasoned C++ developer, there are some nuggets and data points in the middle of the talk that I think you will find useful in your own work...

HPX version 0.9.8 released -- STE||AR Group

The STE||AR Group has released V0.9.8 of HPX -- A general purpose parallel C++ runtime system for applications of any scale.

HPX V0.9.8 Released

The newest version of HPX (V0.9.8) is now available for download! Please see here for the release notes.

HPX now exposes an API fully conforming to the concurrency related parts of the C++11 and the draft C++14 standards, extended and applied to distributed computing.

From the announcement:

  • A large part of the code base of HPX has been refactored and partially re-implemented: the threading and networking subsystems have been improved in performance, modularity, and robustness, the API was improved for closer conformance to the concurrency related parts of the C++11 and C++14 draft standards and the upcomming Concurrency TS.
  • We added new API functionality like hpx::migrate and hpx::copy_component which are the basic building blocks necessary for implementing higher level abstractions for system-wide load balancing, runtime-adaptive resource management, and object-oriented check-pointing and state-management.
  • We improved the distributed reference counting scheme used by HPX which helps managing distributed objects and memory.

CppCon 2014 Registration Open: September 7-12, Bellevue, WA, USA

cppcon-173.PNGThe Standard C++ Foundation is very pleased to announce the first annual CppCon.

cppcon-logo.PNG

Registration is now open for CppCon 2014 to be held September 7–12, 2014 at the Meydenbauer Center in Bellevue, Washington, USA. The conference will start with the keynote by Bjarne Stroustrup titled "Make Simple Tasks Simple!"

CppCon is the annual, week-long face-to-face gathering for all C++ users. The conference is organized by the C++ community for the community. You will enjoy inspirational talks and a friendly atmosphere designed to help attendees learn from each other, meet interesting people, and generally have a stimulating experience. Taking place this year in the beautiful Seattle neighborhood and including multiple diverse tracks, the conference will appeal to anyone from C++ novices to experts.

What you can expect at CppCon:

  • Invited talks and panels: The CppCon keynote by Bjarne Stroustrup will start off a week full of insight from some of the world’s leading experts in C++. Still have questions? Ask them at one of CppCon’s panels featuring those at the cutting edge of the language.
  • Presentations by the C++ community: What do embedded systems, game development, high frequency trading, and particle accelerators have in common? C++, of course! Expect talks from a broad range of domains focused on practical C++ techniques, libraries, and tools.
  • Lightning talks: Get informed at a fast pace during special sessions of short, less formal talks. Never presented at a conference before? This is your chance to share your thoughts on a C++-related topic in an informal setting.
  • Evening events and “unconference” time: Relax, socialize, or start an impromptu coding session.

CppCon’s goal is to encourage the best use of C++. The conference is a project of the Standard C++ Foundation, a not-for-profit organization whose purpose is to support the C++ software developer community and promote the understanding and use of modern, standard C++ on all compilers and platforms.

C++17: I See a Monad in Your Future!

Thoughts on Monads and Futures in C++

C++17: I See a Monad in Your Future!

by Bartosz Milewski

From the Article:

If you thought you were safe from functional programming in your cozy C++ niche, think again! First the lambdas and function objects and now the monad camouflaged as std::future. But do not despair, it’s all just patterns. You won’t find them in the Gang of Four book, but once you see them, they will become obvious.

C++ Papers for Issaquah -- Concurrency

So I just started to read through the papers for the next C++ committee meeting in Issaquah in February, first part is about Concurrency:

C++ Papers for Issaquah -- Concurrency

by Jens Weller

From the article:

In february the C++ committee is going to meet for a week in Issaquah, it could be the final Meeting for C++14, the papers in this series will reflect both, C++14 and the standard that will come after it. Currently mostly known as C++1y. A lot of papers that are not part of C++14 will be formed into technical specifications, which some will then become C++1y later. Like the last series, I will again focus on the working groups, and post the papers sorted by the name of the working group, starting with concurrency.

HPX version 0.9.7 released -- STE||AR Group, LSU

The STE||AR Group at Loisiana State University has released V0.9.7 of HPX -- A general purpose parallel C++ runtime system for applications of any scale.

HPX V0.9.7 Released

The newest version of HPX (V0.9.7) is now available for download! Over the past few months...

From the announcement:

  • Ported HPX to BlueGene/Q
  • Improved HPX support for Intel Xeon Phi® accelerators.
  • Reimplemented hpx::bind, hpx::tuple, and hpx::function for better performance and better compliance with the C++11 Standard. Added hpx::mem_fn.
  • Reworked hpx::when_all and hpx::when_any for better C++ compliance. Added hpx::when_any_swapped.
  • Added hpx::copy as a precursor for a migrate functionality, added hpx::get_ptr allowing to directly access the memory underlying a given component.
  • Added the hpx::lcos::broadcast, hpx::lcos::reduce, and hpx::lcos::fold collective operations.
  • Added support for more flexible thread affinity control from the HPX command line, such as new modes (balanced, scattered, compact), improved default settings when running multiple localities on the same node.
  • Added experimental executors for simpler thread pooling and scheduling. This API may change in the future as it will stay aligned with the ongoing C++ standardization efforts.
  • Massively improved the performance of the HPX serialization code. Added partial support for zero copy serialization of array and bitwise-copyable types.
  • General performance improvements of the code related to threads and futures.

Ode To a Flat Set -- Jon Kalb

Grecian-Urn-187x300.jpegA nice short overview of when you might want your associative container to use a contiguous implementation instead of a tree under the covers:

Ode to a Flat Set

by Jon Kalb

From the article:

The Boost Container library has a family of flat_* containers that have associative container interfaces and semantics, but are implemented as sorted vectors.

In addition to faster lookup, the flat_* containers have much faster iteration, less memory overhead, fewer allocations, and improved cache performance.

However, as with all things, there are trade-offs.

Double-Checked Locking Is Fixed in C++11 -- Jeff Preshing

preshing.PNGJeff Preshing gives a nice overview of the on-again/off-again/on-again status of a common approach to lazy initialization.

[Ed: Note that DCLP is not just for thread-safe singletons, that's just a handy example. It's for lazy initialization in general.]

Double-Checked Locking Is Fixed in C++11

by Jeff Preshing

From the article:

The double-checked locking pattern (DCLP) is a bit of a notorious case study in lock-free programming. Up until 2004, there was no safe way to implement it in Java. Before C++11, there was no safe way to implement it in portable C++.

As the pattern gained attention for the shortcomings it exposed in those languages, people began to write about it. In 2000, a group of high-profile Java developers got together and signed a declaration entitled “Double-Checked Locking Is Broken”. In 2004, Scott Meyers and Andrei Alexandrescu published an article entitled “C++ and the Perils of Double-Checked Locking”. Both papers are great primers on what DCLP is, and why, at the time, those languages were inadequate for implementing it.

All of that’s in the past. Java now has a revised memory model, with new semantics for the volatile keyword, which makes it possible to implement DCLP safely. Likewise, C++11 has a shiny new memory model and atomic library which enable a wide variety of portable DCLP implementations. C++11, in turn, inspired Mintomic, a small library I released earlier this year which makes it possible to implement DCLP on some older C/C++ compilers as well.

In this post, I’ll focus on the C++ implementations of DCLP...

Papers for Chicago: Concurrency

The start of my series about the papers for the upcoming Chicago meeting, starting with C for Concurrency:

C++ Papers for Chicago: Part 1 -- Concurrency

by Jens Weller

From the article:

As I did write a series about the papers for Bristol, this is the start of the series for Chicago, as at the end of this month the C++ committee will meet again for standardization. I try to...