-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
T-optimizationSomething is slower than it needs to beSomething is slower than it needs to be
Description
It might provide a performance boost if we add methods to Scan that are manually specialized methods of existing calls from the collect method.
Right now we can't make the trait method scan generic over any closure without violating object safety. That means scanning an object requires potentially many indirect calls to the trait object closure. (This also inhibits optimizations I believe.) If for every collector call to scan we added a method scan_??? that had the closure manually inlined for that call, we might be able to get a perf boost.
This is a big readability/performance tradeoff imo.
Metadata
Metadata
Assignees
Labels
T-optimizationSomething is slower than it needs to beSomething is slower than it needs to be