For Software Performance, the Way Data is Accessed Matters! -- Ivica Bogosavljević

Screenshot_2022-11-12_150618.pngAs Crocodile Dundee famously said, "That's not a loop, that's a loop." Just programmers having fun:

For Software Performance, the Way Data is Accessed Matters!

by Ivica Bogosavljević

From the article:

In our experiments with the memory access pattern, we have seen that good data locality is a key to good software performance. Accessing memory sequentially and splitting the data set into small-sized pieces which are processed individually improves data locality and software speed.

In this post, we will present a few techniques to improve the memory access pattern and increase data locality. The advantage of this approach is that the changes are localized in the algorithm itself, i.e. there is no need to change the data layout or the memory layout. The disadvantage is that the algorithms often become more difficult to understand and modify. ...

[... and deep inside the article ...]

Notice that, because the whole cache line is brought from the memory to the data cache, after accessing a[j][i] we can access a[j][i + 1]cheaply, since these two pieces of data belong to the same cache line. The problem in our case is that if n is large, access to a[j][i + 1] will come much after a[j][i] and by that time a[j][i + 1] will be evicted from the data cache. ...

Standard C++ Foundation Annual Report for Fiscal Year 2022

FY2022 Annual Report – Standard C++ Foundation

(fiscal year ending 2022-06-30, plus notes about CppCon 2022)

 

Highlights

This fiscal year FY2022 from 2021-07-01 to 2022-06-30 was our second full year in the pandemic. Although most of the Foundation’s work is done virtually, the pandemic did affect some of our prominent operations, including that CppCon 2021 was held, but was hybrid for the first time.

As in every recent year, the majority of funds received and spent in FY2022 were from running CppCon, which still had large expenses even though it was hybrid with mostly-online attendees in FY2022.

CppCon

Every year, the Foundation runs the CppCon conference, which is currently the largest C++ conference in the world. Since its inception in 2014, a goal for CppCon has been to help raise the bar for all C++ sister conferences. In our inaugural conference in 2014, we were the first C++ conference we know of to professionally record all talks and panels using a paid film crew, and make the videos available for free to everyone in the world; since then, several other conferences have followed suit, including that some have used the same video production company CppCon uses (Bash Films, which we can highly recommend). In each year since, we have continued to strive to add features, most recently professional in-room live captioning in 2019.

In our prior year, FY2021, CppCon was held virtually in September 2020 due to the pandemic; no in-person event was possible.

In FY2022, CppCon was held in October 2021. We were glad to be able to resume partial in-person attendance, but there continued to be government travel restrictions including a U.S. ban on travelers from other countries, and so most of our attendees were on-line. CppCon 2021 was our first-ever hybrid conference, and was only possible thanks to the tireless efforts by the conference organizers and volunteers to figure out how to make an on-site and on-line CppCon work, and make it feel as much like a single conference as possible. We reached a new record attendance, though most of the attendees were on-line elsewhere in the world.

Although CppCon 2022 falls beyond FY2022, we include it here because many of the preparations and expenditures happened before the end of FY2022, and because this report is after CppCon 2022 so we have the information: CppCon 2022 was held in September 2022. It was again a hybrid conference, and although international governmental travel bans were largely (but not wholly) lifted, many companies still had travel restrictions in place due to Covid and/or the economic slowdown. Even so, CppCon 2022 squeaked out a new record in total attendance, with a much larger percentage of attendees returning on-site… for the first time since 2019, the exhibitor hall often felt crowded and the on-site experience felt like a normal bustling conference again!

cppcon-stats-2022.png

The professionally recorded C++ videos are made available worldwide at no charge on the CppCon YouTube channel. Here are some basic channel statistics (with diffs since the last annual report for FY2021, which was published in March 2022):

  • combined viewership: 21.9 million views (+2.4 million since March)
  • a total watch time: 4.3 million hours (+0.4 million since March)
  • channel subscribers: over 120,000 (+20,000 since March)

Next report

Our next annual report will cover the fiscal year from 2022-07-01 to 2023-06-30. The annual report will first be given as usual as a live presentation at our annual Foundation members meeting which is held during the week of the autumn WG21 meeting, which is expected to be in November in 2023. Thereafter it will be put into written form and posted online.

About the Standard C++ Foundation

The Standard C++ Foundation (Standard CPP Foundation in some databases that don’t support + in names) is a Washington 501(c)(6) 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. We do this by operating and funding isocpp.org, the github.com/isocpp and github.com/cplusplus repositories, the CppCon conference including CppCon.org and the CppCon YouTube channel, and providing financial assistance support for WG21 (ISO C++ committee) standards meetings for meeting hosting costs, travel assistance for attendees in financial need, and grants to progress WG21 proposals that have been encouraged but whose the authors cannot progress further without some financial assistance and that the WG21 major subgroup chairs have approved funding.

###

The “Standard C++ Foundation” name and stylized “C++” logo are trademarks of the Standard C++ Foundation. See isocpp.org/home/terms-of-use.

The Facade Pattern -- Rainer Grimm

Untitled.pngPlaying the classics...

The Facade Pattern

by Rainer Grimm

From the article:

The key idea of the Facade Pattern is to provide a simplified interface to a complex system... 

The Facade Pattern is an ideal starting point for decoupling complex systems by introducing layers. Additionally, it can be used as a starting point for deprecating the old interface.

Here are the facts. ...

Improving my C++ time queue -- Marius Elvert

Tick, tock...

Improving my C++ time queue

by Marius Elvert

From the article:

Another code snippet that can be found in a few of my projects is the “time queue”, which is a simple ‘priority queue’ style data structure that I use to defer actions to a later time. ...

CopperSpice: Comparison Operators: Breaking Change in C++20

New video on the CopperSpice YouTube Channel:

Comparison Operators: Breaking Change in C++20

by Barbara Geller and Ansel Sermersheim

About the video:

C++20 added a feature for the compiler to auto generate comparison operators which is often referred to as the spaceship operator. We found a way this can break existing code when supplying your own comparison functions. Watch our video to find out how this can happen in your existing code which has never used the spaceship operator before.

Please take a look and remember to subscribe!

Lifetime extension of temporary objects in C++: common recommendations and pitfalls

After reading this article, you will learn the following: ways to extend the lifetime of a temporary object in C++, various tips and tricks; pitfalls of the lifetime extension that a C++ programmer may face.

Lifetime extension of temporary objects in C++: common recommendations and pitfalls

by Evgeny Neruchek

From the article:

You can extend the lifetime of a temporary array by referencing one of its elements. C++ has a special mechanism for this. But I would recommend you using it only in the disputes with your co-workers (and maybe in metaprogramming with the old C++ standards), since this mechanism is not so easy-to-use. However, using this mechanism does not result in dangling references, and the lifetime of the temporary array is extended to the lifetime of the reference to its element.

FOSSA is announcing the GA of a security and license scanning capability for C and C++ projects

FOSSA was founded to provide the most relevant and real-time end-to-end governance for all third-party code. They now announce the general availability of C and C++ Security and License Scanning

Announcing the GA of C and C++ Security and License Scanning
By Gauthami Polasani

From the article:

Unlike other C/C++ scanning tools, FOSSA does not take a one-solution-fits-all approach to dependency identification in such a complex and layered ecosystem. FOSSA uses multi-pronged strategies (as described below) to accurately identify dependencies and surface security and license risks — regardless of how the code is included.).