Browse Source
Improve locale character tables handling and reduce pattern cache size
Improve locale character tables handling and reduce pattern cache size
If a locale other than C is active, character tables are saved into the compile context. Every compiled pattern will have a pointer to the character table, that was present in the context at the time of the pattern compilation. Thus, the cache entries don't need to carry char tables pointer, which reduces their size to 8 bytes on 64-bit. Instead, the generated character tables are tracked in a separate HashTable. If a character table was generated before, it'll be assigned to the compile context when the locale changes. Otherwise a new char table will be generated and cached.pull/3303/merge
1 changed files with 26 additions and 15 deletions
Write
Preview
Loading…
Cancel
Save
Reference in new issue