Make Data.List.Inits fast
authorDavid Feuer <David.Feuer@gmail.com>
Thu, 16 Oct 2014 07:42:27 +0000 (09:42 +0200)
committerJoachim Breitner <mail@joachim-breitner.de>
Thu, 16 Oct 2014 07:45:02 +0000 (09:45 +0200)
commitcde3a77f9703966145cae481ee35f52dcca2cf7d
tree906bd23a8404e3e92175fe2d888fa0c93eb5cf79
parent4b69d96b3d2758bbc06c58ea44a975c6e08d7400
Make Data.List.Inits fast

Fixes #9345. Use a modified banker's queue to achieve amortized optimal
performance for inits. The previous implementation was extremely slow.

Reviewed By: nomeata, ekmett, austin

Differential Revision: https://phabricator.haskell.org/D329
libraries/base/Data/OldList.hs
libraries/base/tests/all.T
libraries/base/tests/inits.hs [new file with mode: 0644]