Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3053 +/- ##
==========================================
+ Coverage 84.26% 84.35% +0.08%
==========================================
Files 258 258
Lines 56982 57205 +223
Branches 4854 4867 +13
==========================================
+ Hits 48016 48253 +237
+ Misses 8139 8126 -13
+ Partials 827 826 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| return ret | ||
|
|
||
|
|
||
| class FindSymbolsCache: |
There was a problem hiding this comment.
I'm really not comfortable with this kind of ad-hoc solutions
| def __init__(self, mode: str = 'symbolics') -> None: | ||
| @classmethod | ||
| @contextmanager | ||
| def caching(cls): |
There was a problem hiding this comment.
an ad-hoc solution... that's quite scary
| if not self.ordered: | ||
| return found | ||
|
|
||
| cache = _find_symbols_cache.get() |
There was a problem hiding this comment.
conflating implementation with optimization like that, is all but pythonic
| mapper[i] = i._rebuild(name=sregistry.make_name(prefix='nthreads')) | ||
|
|
||
|
|
||
| def _contains(found): |
There was a problem hiding this comment.
yet another ad-hoc expedient.
If you need a smarter data structure, implement the smarter data structure (under tools/data_structure)
Performance upgrades for
FindSymbolswhich yield appreciable compilation time reduction. Mainly based on caching results, although it also introduces an unsorted mode for cases where the check only needs to ensure that a symbol is present.This is entirely Claude/Codex to begin with so needs review for sanity checking and human readability. I suspect tweaks will be required.