Simple data structures--Arne Mertz
Keep it simple!
Simple data structures
by Arne Mertz
From the article:
Keep simple data structures simple! There’s no need for artificial pseudo-encapsulation when all you have is a bunch of data...
March 23-28, London, UK
By Adrien Hamelin | Dec 20, 2018 02:19 PM | Tags: basics
Keep it simple!
Simple data structures
by Arne Mertz
From the article:
Keep simple data structures simple! There’s no need for artificial pseudo-encapsulation when all you have is a bunch of data...
By Adrien Hamelin | Dec 20, 2018 02:08 PM | Tags: performance
It's all for speed.
The SoA Vector – Part 1: Optimizing the Traversal of a Collection
by Sidney Congard
From the article:
I like C++ because it offers a good compromise between writing expressive and fast code. But, I discovered a problem where I didn’t know any way to hide the implementation detail away from its use: The “Structure of Arrays” (SoA) versus the “Array of Structures” (AoS) problem.
This is the first part of a series of two articles:
- what ‘SoA’ is about and what benefits it brings (part 1)
- how to implement an SoA vector in C++ (part 2)
So let’s see what those SoA and AoS are all about...
By Adrien Hamelin | Dec 19, 2018 12:41 PM | Tags: community
ACCU’s Overload journal of December 2018 is out. It contains the following C++ related articles.
Overload 148 is now available
From the journal:
Revolution, Restoration and Revival.
Trends cycle in seasons. Frances Buontempo wonders what programmers should on the lookout for.Diseconomies of Scale.
Bigger is not always better. Allan Kelly considers when smaller is more productive.Flip Model: A Design Pattern.
Publishing dynamic, complex data to many clients in a threadsafe manner is challenging. Daniele Pallastrelli presents the Flip model pattern to overcome the challenges.Memory Management Patterns in Business-Level Programs.
There are many memory management patterns. Sergey Ignatchenko considers these from an application level.Compile-time Data Structures in C++17: Part 3, Map of Values.
A compile time map of values allows code to be tested more easily. Bronek Kozicki demonstrates how to avoid a central repository of values.Algol 68 - A Retrospective.
Algol 68 has influenced programming languages in many ways. Daniel James reminds us just how many.Measuring Throughput and the Impact of Cache-line Awareness.
How do you measure throughput? Richard Reich and Wesley Maness investigate suitable metrics.
By Adrien Hamelin | Dec 19, 2018 12:35 PM | Tags: c++17 advanced
It's not cool.
Stop with the CTAD FUD!
by Colby Pike
From the article:
Among the catalog of features introduced by C++17, you’ll find a feature known as Class Template Argument Deduction, often shortened to “CTAD”. It was one of the largest language changes in C++17, and with it comes a new syntax and a new set of rules to understand.
It’s still very early in the game for CTAD, but we’re already seeing many strong opinions about it without seeing its widespread effect on codebases. In particular, we’re seeing a lot of Fear, Uncertainty, and Doubt about CTAD...
By Adrien Hamelin | Dec 12, 2018 08:36 AM | Tags: intermediate c++17
Useful to recall.
Overview of std::map’s Insertion / Emplacement Methods in C++17
by Walletfox
From the article:
TL;DR Go ahead and try out the C++17 emplacement / insertion methods. They offer a tangible improvement in terms of expressiveness and code safety.
Here are examples of code using them...
By Adrien Hamelin | Dec 12, 2018 08:29 AM | Tags: c++17 advanced
Were you aware?
Deducing your intentions
by Andrzej Krzemieński
From the article:
The language feature in C++17 known as class template argument deduction was intended to supersede factory functions like make_pair, make_tuple, make_optional, as described in p0091r2. This goal has not been fully achieved and we may still need to stick to make_ functions. In this post we will briefly describe what class template argument deduction is, and why it works differently than what people often expect...
By Adrien Hamelin | Dec 10, 2018 09:36 AM | Tags: experimental
Coming soon.
Standard Ranges
by Eric Niebler
From the article:
As you may have heard by now, Ranges got merged and will be part of C++20. This is huge news and represents probably the biggest shift the Standard Library has seen since it was first standardized way back in 1998.
This has been a long time coming. Personally, I’ve been working toward this since at least November 2013, when I opined, “In my opinion, it’s time for a range library for the modern world,” in a blog post on input ranges. Since then, I’ve been busy building that modern range library and nailing down its specification with the help of some very talented people.
Future blog posts will discuss how we got here and the gritty details of how the old stuff and the new stuff play together (we’re C++ programmers, we love gritty details), but this post is strictly about the what...
By Adrien Hamelin | Dec 10, 2018 09:27 AM | Tags: experimental
An answer.
span: the best span
by Barry Revzin
From the article:
This post is a response to RangeOf: A better span, which has many problems worth addressing in detail. While most of this post will deal with specifically std::span<T> (which is indeed the best span), the last section will also discuss a recent addition to the standard library: std::ranges::subrange<T*>...
By Christopher Di Bella | Dec 9, 2018 10:21 AM | Tags: None
In today’s blog, we look at both the newly minted Study Group for education in the C++ Standard Committee. We also look at a small number of conference videos that I recommend teachers consider while they’re waiting for this Study Group to produce usable materials.
SG20 Education and Recommended Videos for Teaching C++
by Christopher Di Bella
From the article:
As articulated in P1231, the goal of SG20 is not to provide normative curricula for teaching C++, but rather to provide teaching and curriculum guidelines.
...
Below are a list of conference videos that I’ve compiled for teachers to watch (and will update if recommendations come in). There’s well over a day’s worth of videos below, but these aren’t a random assortment of my favourite conference videos. Rather, they are sessions that communicate values about:
- teaching people how to write programs using C++, or
- writing C++ programs using approaches the community agrees produce better code.
By Adrien Hamelin | Dec 6, 2018 01:45 PM | Tags: None
The future of now.
An Extraterrestrial Guide to C++ Formatting
by Victor Zverovich
From the article:
Consider the following use case: you are developing the Enteropia[2]-first Sepulka[3]-as-a-Service (SaaS) platform and have a server code written in C++ that checks the value of sepulka’s squishiness received over the wire and, if the value is invalid, logs it and returns an error to the client. Squishiness is passed as a single byte and you want to format it as a 2-digit hexadecimal integer, because that is, of course, the Ardrite[1] National Standards Institute (ANSI) standard representation of squishiness. Let’s implement the logging part using different formatting facilities provided by C++...