Avoid repeated list elem checks
authorDavid Feuer <david.feuer@gmail.com>
Sun, 12 Feb 2017 00:23:20 +0000 (19:23 -0500)
committerBen Gamari <ben@smart-cactus.org>
Sun, 12 Feb 2017 00:58:34 +0000 (19:58 -0500)
commit7938ef23387e10ea8e33fc6531706b79c62634af
treedd21cab4aed3eb7a41e5bcb439e15035c5be2dbb
parent64da671afb9fdb097ff355a9cca1c8ed098a9114
Avoid repeated list elem checks

Convert a list to a set before testing membership multiple times.

Reviewers: austin, bgamari

Reviewed By: bgamari

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3111
compiler/main/SysTools.hs