Open
Description
I'm seeing some decent improvements in union
, difference
, etc. on inlining the no-rebalance Bin-Bin case of link
containers/containers/src/Data/Map/Internal.hs
Lines 4019 to 4025 in 82c21f0
This is just like #1053, that the common case is one where no balancing is required, and making sure that's fast pays off.
I'll prepare a PR for it.
While I'm here, I'm going to change link
to delegate to left-only and right-only variants of link
. This better represents what's going on, i.e. link
never switches directions. I've thought about this but didn't have a good reason to touch the code before.