Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`regexes.yaml` contains quite a lot of duplicated strings. By passing `freeze: true` to `YAML.load` we allow the parser to deduplicate them. Additionally, the regexes source and flags are never used, so they can be removed from the long lived hashes. Before: ``` Total allocated: 3.47 MB (28214 objects) Total retained: 1.45 MB (8422 objects) ``` After: ``` Total allocated: 3.71 MB (30218 objects) Total retained: 1.24 MB (4583 objects) ``` It's not a big difference in size, but it cuts down in half the number of objects than need to be marked by the GC.
- Loading branch information