Use FlatHashSet to store common TLDs.

This commit is contained in:
levlam 2023-05-19 14:00:49 +03:00
parent 1da3955271
commit d510bc8435

View File

@ -1015,7 +1015,7 @@ bool is_email_address(Slice str) {
}
static bool is_common_tld(Slice str) {
static const std::unordered_set<Slice, SliceHash> tlds(
static const FlatHashSet<Slice, SliceHash> tlds(
{"aaa", "aarp", "abarth", "abb", "abbott", "abbvie", "abc", "able", "abogado", "abudhabi", "ac", "academy",
"accenture", "accountant", "accountants", "aco", "active", "actor", "ad", "adac", "ads", "adult", "ae", "aeg",
"aero", "aetna", "af", "afamilycompany", "afl", "africa", "ag", "agakhan", "agency", "ai", "aig", "aigo",