mkvtoolnix/rake.d
Moritz Bunkus 39529c226b
languages/scripts/regions/IANA lists: use different method of initialization
The prior method was to generate one line of
`g_container.emplace_back(…)` per entry in the list & letting the
compiler chew on that. Each string argument in that call was done was
`u8"Some Name"s`, meaning as a std::string instance.

Drawbacks:

• takes the compiler ages to compile, even forcing me to drop all
  optimizations for the ISO-639 language list file

• even smaller files such as the IANA language subtag registry lists
  take more than 30s to compile

• due to no optimizations initialization is actually not as fast as
  could be

The new method uses a plain C-style array of structs with `char
const *` entries for the initial list. The initialization method then
copies the entries from that list to the actual container, again using
`std::emplace_back(…)`.

This yields sub-1s compilation times even with the longest file, the
ISO-639 language list, and the runtime initialization is actually
faster.
2022-04-23 00:00:15 +02:00
..
vendor
application.rb build system: convert to one exe per benchmark file 2022-04-22 21:31:37 +02:00
compilation_database.rb
config.rb
digest.rb
extensions.rb languages/scripts/regions/IANA lists: use different method of initialization 2022-04-23 00:00:15 +02:00
format_string_verifier.rb
gtest.rb
helpers.rb
iana_language_subtag_registry.rb languages/scripts/regions/IANA lists: use different method of initialization 2022-04-23 00:00:15 +02:00
installer.rb
iso639.rb languages/scripts/regions/IANA lists: use different method of initialization 2022-04-23 00:00:15 +02:00
iso3166.rb languages/scripts/regions/IANA lists: use different method of initialization 2022-04-23 00:00:15 +02:00
iso15924.rb languages/scripts/regions/IANA lists: use different method of initialization 2022-04-23 00:00:15 +02:00
library.rb
online_file.rb
pch.rb
po.rb
requirements.rb
source_tests.rb
tarball.rb
target.rb