Commit Graph

11 Commits

Author SHA1 Message Date
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
Moritz Bunkus
09b6ebdf9c
BCP47: scripts: include fact whether entries are deprecated
Part of the implementation of #3307.
2022-03-26 13:40:09 +01:00
Moritz Bunkus
ac49424ca7
BCP47: add scripts present in IANA registry but not part of ISO 15924
There actually are none, but it's good to have the code to do it in
case this ever happens.

Part of the implementation of #3307.
2022-03-26 13:40:09 +01:00
Moritz Bunkus
beedd3183d
build system: fix download location for ISO 15924 script code list 2022-03-24 21:39:23 +01:00
Moritz Bunkus
7858db3ade
ISO 15924: added all private use entries, not just start & end 2021-07-19 14:32:12 +02:00
Moritz Bunkus
20437cb0f6
build system: move file download handling to dedicated module 2021-07-17 12:26:48 +02:00
Moritz Bunkus
b0986ba9ff
BCP 47: use emplace_back for initialization of ISO 15924 script list
It's much faster than using the initializer lists. See previous commits
for more details.
2021-01-26 14:53:31 +01:00
Moritz Bunkus
ed309582ce
BCP 47: various lists: cosmetics (remove superfluous space at end of row) 2021-01-26 14:53:30 +01:00
Moritz Bunkus
d5dbdb0a7e
replace outdated link to GPLv2 with current one 2020-08-01 18:03:54 +02:00
Moritz Bunkus
908329f1ca
Rakefile: use range with explicit upper end for older Ruby versions 2020-07-02 19:34:46 +02:00
Moritz Bunkus
d5239fabb9
Rakefile: add target for generating list of ISO 15924 scripts 2020-07-02 19:09:47 +02:00