The surprisingly high cost of static-lifetime constructors--Arthur O’Dwyer

Today we look at compile time performance.

The surprisingly high cost of static-lifetime constructors

by Arthur O’Dwyer

From the article:

I was looking at HyperRogue again this week (see my previous post). It has a really nice localization framework: every message in the game can be translated just by adding a lookup entry to a single file (like, for the Czech translation, you add entries to language-cz.cpp); and then during the build process, all the language-??.cpp files are collated together and used to produce a single language-data.cpp file with a lookup table from each English message to the same message in every other language. (Seeing all the messages at once allows us to report on how “complete” each translation is, relative to the others.)...


Add a Comment

Comments are closed.

Comments (1)

0 0

ivafanas said on Jun 27, 2018 09:44 PM:

I don't see any threadsafe guards there!((g:!((g:!((h:codeEditor,i:(j:1,lang:c++,source:'



If you add a static std::string to the function code threadsafe guards will appear.
Looks like a misunderstanding.