Per-thread weak pointer list (remove global lock on mkWeak#)
|Reported by:||ezyang||Owned by:||ezyang|
|Type of failure:||Runtime performance bug||Test Case:|
|Related Tickets:||Differential Revisions:|
Currently, we have to take out the storage manager lock when a weak pointer is allocated. If you're making a lot of weak pointers, this could become a bottleneck. We should maintain a per-thread weak pointer list per generation, so that we don't have to take out a lock.
Marking priority as low since I don't think anyone actually is trying to allocate tons of weak pointers on multiple threads, but I think this optimization should be relatively cheap. Probably a good starter ticket.