This patch replaces the BVH Tree currently used by the Weld Modifier with the KD Tree used by Merge > By Distance. This changes the result of the Weld Modifier to more closely match Merge > By Distance.
Additionally to the quality improvement there is also a big performance advantage.
Try this blend file with and without the patch. With the patch it's 4x faster when played in comparison with current master with Duplicate Limit set to 1. If all subsurf modifiers are applied then this patch will be 14x faster than master.
I also tested models that would not have merged vertices and even there the KD Tree is 17% faster.
Here is an overview
| 2.90 (Duplicate Limit = 0) | 2.90 (Duplicate Limit = 1) | master (BVH) (Duplicate Limit = 1) | patch (KD) |
| 1.69s | 0.17s | 0.12s | 0.029s |