Pipes vs. Conduit Benchmarks - Pure

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
    {-
    import Pipes
    import qualified Pipes.Prelude as P
    
    -- Approx. 3.1 seconds
    main = runEffect $
        for (each [(1::Int)..100000000] >-> P.map (+1) >-> P.filter even) discard
    -}
    
    import Data.Conduit
    import Data.Conduit.List as CL
    
    -- Approx. 17.1 seconds
    main = sourceList [(1::Int)..100000000] $$
        CL.map (+1) =$ CL.filter even =$ CL.sinkNull