This is not important but for some reason, the use of the imported replicateM_ for take and drop impedes optimization. I noticed this fiddling with some machines benchmarks of individual functions. See https://gist.github.com/michaelt/f19bef01423b17f29ffd The first list of results is hackage-pipes; the second is with these two repairs
benchmarking drop/conduit
time 26.56 ms (26.31 ms .. 26.79 ms)
benchmarking drop/pipes
time 43.64 ms (42.48 ms .. 45.46 ms)
-- and with the modified drop:
benchmarking drop/pipes
time 28.03 ms (26.75 ms .. 29.67 ms)
Then
benchmarking take/conduit
time 45.38 ms (44.57 ms .. 46.45 ms)
benchmarking take/pipes
time 84.44 ms (78.23 ms .. 91.36 ms)
and with the modified take:
benchmarking take/pipes
time 55.05 ms (53.84 ms .. 56.26 ms)
This is not important but for some reason, the use of the imported
replicateM_
fortake
anddrop
impedes optimization. I noticed this fiddling with some machines benchmarks of individual functions. See https://gist.github.com/michaelt/f19bef01423b17f29ffd The first list of results is hackage-pipes; the second is with these two repairs-- and with the modified drop:
Then
and with the modified take: