-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
📊 Cache region/locset during paint/place. (#2389)
Add a small (=1 element) cache to avoid constantly calling `thingify` on the same expressions. In my experiments, this will save 5-10% time during initialization of complex cable cells at no extra cost, as we need to have one item (`mextent` for regions or `mlocation_list` for locsets) in memory anyhow. Unfortunately, this means that cable cells are faster or slower depending on paint/place _order_, but I don't anticipate _sorting_ decorations first is worth it. Also, observe our own caching rules to make `busyring` slightly faster. Anecdoctal performance numbers: ``` busyring: Before: 185.95s After: 172.94s ``` Tested with 2048 complex cells of depth 10 running on a single core, pure initialization.
- Loading branch information
1 parent
a4c3fa6
commit b589c88
Showing
2 changed files
with
45 additions
and
42 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