Articles & Books

Singleton revisited—Giuseppe Puoti

The use of Singleton is often justified by the will of being able to easily refer to a unique object from any point. Giuseppe Puoti describes an alternative:

Singleton revisited

by Giuseppe Puoti

From the article:

It happens quite often to deal with those annoying objects, used everywhere in your applications. This may be because of a poorly designed application but, sometime, it is simply an inevitable condition...

C++ Braced Initialization—Edouard of quasardb

Do you use it?

C++ Braced Initialization

by Edouard of quasardb

From the article:

Since C++ 11 it's possible to use braces for construction and initialization. Although this is something you could ignore for the code you write, it's obviously important to know for the code you may read.

If you have a couple of years of experience in C++, the temptation can be great to keep your old habits because "All these new features are useless! The language is bloated! Those people in the committee!".

Let's make sense out of the bloat...

I Wrote The Fastest Hashtable—Malte Skarupke

This is Malte's third article on hash table design. His solution shows favorable performance against std::unordered_map, boost::multi_index, google::dense_hash_map, and more. Malte includes intuitive descriptions of why each design decision was made and what tradeoffs might exist. The article also describes some interesting artifacts in the implementations of other hash table implementations.

I Wrote The Fastest Hashtable

by Malte Skarupke

From the article:

There are many types of hashtables. For this one I chose

  • Open addressing
  • Linear probing
  • Robing hood hashing
  • Prime number amount of slots (but I provide an option for using powers of two)
  • With an upper limit on the probe count

I believe that the last of these points is a new contribution to the world of hashtables. This is the main source of my speed up, [...]

Reflections on the reflection proposals

Since the overview on the current papers for Kona, I wanted to know more about reflection...

Reflections on the reflection proposals

by Jens Weller

From the article

A few weeks ago I wrote a short overview over the most interesting papers for the current C++ Committee meeting in Kona, Hawaii. The big surprise was that there were many papers on reflection, while there already is a very detailed proposal for reflection.

With the C++ committee currently in Kona discussing lots of proposals, there will be some changes to the on going effort for reflection, but the current proposals are detailed enough to give an overview.

Generating Sequences

A virtual container.

Generating Sequences

By Anthony Williams

From the article:

I was having a discussion with my son over breakfast about C++ and Python, and he asked me if C++ had anything equivalent to Python's range() function for generating a sequence of integers. I had to tell him that no, the C++ standard library didn't supply such a function, but there were algorithms for generating sequences (std::generate and std::generate_n) into an existing container, and you could write something that would provide a "virtual" container that would supply a sequence as you iterated over it with range-for...

C++ User Group Meetings in March

The monthly overview on upcoming C++ User Group Meetings:

C++ User Group Meetings in March

by Jens Weller

From the article:

The monthly overview on upcoming C++ User Group meetings. Its already 39 User Groups meetings in March, I expect a few more User Groups to announce their meetings in the coming weeks!

There are 3 new C++ User Groups...