Base.iterate for TypeSortedCollections#505
Conversation
|
it would be great to test the performance of a loop like this for d in get_components(Device, sys)
foo(d)
endvs for d in TSCO
foo(d)
end |
|
Just came across this after a few months, so I though I'd post an update. I've come to the conclusion that it's not possible to implement
My current suggestion: |
|
The problem still persists, but the solution in this PR has fallen out of favor. Explicitly caching the collection in a type-stable way (see PNM's YBusACBranches) seems like a better approach. |
Yet to do profiling, but it's working. Tests were mostly written by CoPilot.
The tests that are failing are unrelated, would be fixed by rebasing onto main. [I tried doing that, but got conflicts.]