-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.
Description
This interacts poorly with with_capacity
since it will just end up shrinking the allocation immediately. It's very widely used since FromIter
uses it with the iterator size hint. Even in code that's not pre-allocating capacity, the resize strategy results in many reallocations as the hash table shrinks and then grows again. Allocator improvements are possible but this is always going to be extremely expensive for huge collections on most platforms.
Metadata
Metadata
Assignees
Labels
I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.