Special case a few common patterns in unionLists.
authorAndreas Klebinger <klebinger.andreas@gmx.at>
Sun, 7 Jul 2019 19:50:56 +0000 (21:50 +0200)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Thu, 11 Jul 2019 21:46:57 +0000 (17:46 -0400)
commit01ec8549871ebc43db3a7e28324222fa739c6531
tree686b8395a2da9d12a9935fb7f204f7c19a70a5d0
parentcb5271ac9a6686d065de63d1dde80e713830e21b
Special case a few common patterns in unionLists.

In particular we very often pass one empty list and in these
cases we want to avoid the overhead of computing `xs ++ []`.

This should fix #14759 and #16911.
compiler/utils/ListSetOps.hs