added a comment - - edited
This patch (transient-merge.diff) makes merge, merge-with, and zipmap (since it was right there and could obviously benefit from transients as well) use transients.
Three potential issues:
- I had to move the functions, since they depend on transient and friends. I assume this is preferable to a forward declaration. This was the best place I could find, but happy to move them elsewhere.
- I added multiple arities, to avoid potential performance cost of transient-ing a single argument. Happy to undo this if desired.
- I had to slightly alter the logic in merge-with, since transient maps don't support contains? (or find).