[commit: packages/containers] cleaned_bugfix394, master, merge-doc-target, merge-fixes-5.9, merge-restrict-fix-5.8, revert-408-bugfix_394: Use ScopedTypeVariables to optimize zipping (#280) (c37a5bb)

git at git.haskell.org git at git.haskell.org
Mon Apr 17 21:43:19 UTC 2017


Repository : ssh://git@git.haskell.org/containers

On branches: cleaned_bugfix394,master,merge-doc-target,merge-fixes-5.9,merge-restrict-fix-5.8,revert-408-bugfix_394
Link       : http://git.haskell.org/packages/containers.git/commitdiff/c37a5bb59228f7976792dc1a2013a2442f39b41b

>---------------------------------------------------------------

commit c37a5bb59228f7976792dc1a2013a2442f39b41b
Author: David Feuer <David.Feuer at gmail.com>
Date:   Wed Jun 1 19:37:28 2016 -0400

    Use ScopedTypeVariables to optimize zipping (#280)
    
    `splitMap` was annoyingly sensitive to any minor change anywhere,
    presumably because it was tough on the inliner. Using
    `ScopedTypeVariables` when compiling with GHC, we can pull the
    splitting function out of the polymorphic recursion. Suddenly
    GHC starts unboxing `Int`s and generally acting like a happier
    compiler. I'm hopeful that `ScopedTypeVariables` will be in the
    next standard so we can eventually drop the other code.
    
    Also, modify the `Split` type to make it more obvious that we
    only force things we're allowed to.
    
    Also also, make `chunksOf` a bit more tolerant. Now it only
    complains if it's asked to produce non-positive-sized chunks
    of a non-empty sequence.


>---------------------------------------------------------------

c37a5bb59228f7976792dc1a2013a2442f39b41b
 Data/Sequence.hs | 101 ++++++++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 82 insertions(+), 19 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc c37a5bb59228f7976792dc1a2013a2442f39b41b


More information about the ghc-commits mailing list