efficiency

Cling Aims to Provide a High-performance C++ REPL--Sergio De Simone

Read about a REPL allowing to test things rapidly in C++:

Cling Aims to Provide a High-performance C++ REPL

by Sergio De Simone

From the article:

Cling is an interactive C++ interpreter that is built on top of LLVM and Clang and promises to provide a leap in productivity by going beyond the usual code-compile-run-debug C++ workflow...

Other useful materials:

CppCon 2014 Microsoft w/ C++ to Deliver Office Across Different Platforms, Part I--Zaika Antoun

While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:

Microsoft w/ C++ to Deliver Office Across Different Platforms, Part I

by Zaika Antoun

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

What does it take to target multiple major mobile devices (as well as traditional environments) with portable, efficient, single-source code? This talk demonstrates architectures, techniques, and lessons learned rooted in actual experience with using C++ to deliver several major cross-platform projects across iOS, Android, Windows, and Mac: Microsoft Office (Word, Excel, PowerPoint, OneNote) and the SQL Server PowerBI. Each presents a different case study: For example, Office already used C++, whereas PowerBI was originally written in Silverlight and then rewritten in C++; Office is a set of user-facing apps, whereas PowerBI is a system component. Although some of these are demanding first-tier “Cadillac” applications, we expect this experience to be a model for the future as more and more apps fall into this category and use C++ to target many popular platforms from (mostly) a single source base. This talk will cover the following key topics and tradeoffs: Rich vs. reach, including access to latest OS features (e.g., iOS 8 additions) and hardware features (e.g., vector units, GPUs). Consistency of functionality. Client code vs. server/service web code. Sharing vs. quality, including dialing appropriately between more shared code and high quality code. Drawing the line between the bulk of C++ code and interfacing with non-C++ for UX and PALs (platform adaptation/abstraction layers) for target-specific user interface and system services. Architecting PALs, including why “mini-PALs” rather than an “über-PAL.” Forces “doing the right thing” and good architecture with composable components. How C++ enables things not feasible using other technologies. Velocity and enabling faster cross-platform development and deployment. Cost of maintenance, including time, size, and complexity (both breadth and depth). And, last but not least, developing in a single modern C++ source base built with different evolving C++ compilers, including VC++ and Clang/LLVM.

CppCon 2014 UI prototyping and development for multiple devices in C++--John "JT" Thomas

While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:

UI prototyping and development for multiple devices in C++

by John "JT" Thomas

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Using C++ for multi-device user interface and app development should be pretty straightforward. However, since the Standard C++ Language and Library specification does not specify a user interface library, it's actually quite challenging given that the two leading mobile platforms provide non-C++ User Interface APIs. Even more challenging is the new world of mobile devices and the myriad form factors, layouts, resolutions, sensors, and services that an application developer has to deal with. Plus, the deployment model for remote devices makes testing UI changes slower due to the increased build and turnaround time. This session will describe how C++ can be used effectively for multi-device UI development and also deliver a rapid prototyping experience to minimize the deployment time to the device for testing.

CppCon 2014 Optimization Tips - Mo' Hustle Mo' Problems--Andrei Alexandrescu

While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:

Optimization Tips - Mo' Hustle Mo' Problems

by Andrei Alexandrescu

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Reasonably-written C++ code will be naturally fast. This is to C++'s excellent low-penalty abstractions and a memory model close to the machine.

However, a large category of applications have no boundaries on desired speed, meaning there's no point of diminishing returns in making code faster. Better speed means less power consumed for the same work, more workload with the same data center expense, better features for the end user, more features for machine learning, better analytics, and more.

Optimizing has always been an art, and in particular optimizing C++ on contemporary hardware has become a task of formidable complexity. This is because modern hardware has a few peculiarities about it that are not sufficiently understood and explored. This talk discusses a few such effects, and guides the attendee on how to navigate design and implementation options in search for better performance.

CppCon 2014 Lock-Free Programming (or, Juggling Razor Blades), Part II--Herb Sutter

While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:

Lock-Free Programming (or, Juggling Razor Blades), Part II

by Herb Sutter

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Example-driven talk on how to design and write lock-free algorithms and data structures using C++ atomic -- something that can look deceptively simple, but contains very deep topics. (Important note: This is not the same as my "atomic Weapons" talk; that talk was about the "what they are and why" of the C++ memory model and atomics, and did not cover how to actually use atomics to implement highly concurrent algorithms and data structures.)

CppCon 2014 Lock-Free Programming (or, Juggling Razor Blades), Part I--Herb Sutter

While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:

Lock-Free Programming (or, Juggling Razor Blades), Part I

by Herb Sutter

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Example-driven talk on how to design and write lock-free algorithms and data structures using C++ atomic -- something that can look deceptively simple, but contains very deep topics. (Important note: This is not the same as my "atomic Weapons" talk; that talk was about the "what they are and why" of the C++ memory model and atomics, and did not cover how to actually use atomics to implement highly concurrent algorithms and data structures.)

CppCon 2014 Another fundamental shift in Parallelism Paradigm?--Michael Wong

While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:

Another fundamental shift in Parallelism Paradigm?

by Michael Wong

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Another fundamental shift in Parallelism Paradigm? Sure. When was the last time you heard that before?

But seriously, as the number of threads/cores continue to increase, there is a growing pressure on applications to exploit more of the available parallelism in their codes, including coarse-, medium-, and fine-grain parallelism. OpenMP has been one of the dominant shared-memory programming models but is evolving beyond that with a new Mission Statement (no, really!) making it well suited for exploiting medium- and fine-grained parallelism.

OpenMP 4.0 exhibits many of these features to support the next step in both consumer, high-performance and exascale computing, with one of the world's first programming model for high-level language support for GPU/Accelerators and vector SIMD across not 1 but 3 high-level languages: C++, C, and that language whose name we dare not speak, but starts with F.

CppCon 2014 Lock-free by Example--Tony Van Eerd

While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:

Lock-free by Example

by Tony Van Eerd

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Dive into and follow along making a lock-free queue.

In particular, a multi-producer, multi-consumer, growing, shrinking, mostly contiguous, lock-free circular queue.

With this single (complicated!) example, we will come across, and attempt to solve, many of the typical problems found in lockfree programming, and delve into the pros and cons of various solutions to those problems.

Tippet: Use reference_wrapper to create views of data -- Indi

Explicit C++ describes how to use std::reference_wrapper to create alternative views of data.

Tippet: Use reference_wrapper to create views of data

by Indi

from the article:

When working with objects indirectly, always use references. Only use pointers to indicate optional referencing. But there’s one little hitch: because you can’t rebind references, you can’t simply have a container of references. Enter std::reference_wrapper.