-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: collisions don't contain reserved names by default (#684)
The 'collisions' set does NOT contain RESERVED_NAMES; they are combined at runtime when needed. For a large real-world, this results in an order of magnitude reduction in memory usage. I'm not joking: Google Ads v5 uses 2.45 GB peak before this change and 223 MB after. Also contains changes to add `__slots__` attributes to Metadata and Address. These are ancillary, optional, and open to negotiation. In the above scenario, they reduce memory usage from 223 MB to 177 MB. If other people feel that the reduction in readability does not warrant the reduction in memory usage I am absolutely open to dropping that particular commit. Includes other minor memory usage optimizations that collectively shave about 5 MB.
- Loading branch information
1 parent
18425e2
commit 2ec6ea6
Showing
2 changed files
with
12 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters