Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Simplify and remove most allocations from `UnionFind.find` by using exceptions and looping instead of options and recursion. In a test target this leads to about 600 fewer minor collections (over a baseline of 5800). memtrace (after backporting to 4.14) shows a much bigger reduction of total allocations (from 20B to 18B) and a complete disappearance of `UnionFind.find/find_opt` from the top 10 allocators (it was 3rd). Reviewed By: davidpichardie Differential Revision: D69612368 Privacy Context Container: L1208441 fbshipit-source-id: e7e17b87b7bda99becc0df40f7283c5f0372a8d4
- Loading branch information