That demonstrated the issue: I'd forgotten to pass O_TRUNC to the open system call. Adding that back makes the numbers much more comparable.

Thanks for the input everyone, and Gregory for finding the actual problem (as well as pointing out a few other improvements).


On Fri, Mar 8, 2013 at 12:13 PM, Gregory Collins <greg@gregorycollins.net> wrote:
Something must be wrong with the conduit "NoHandle" code. I increased the filesize to 60MB and implemented the copy loop in pure C, the code and results are here:

https://gist.github.com/gregorycollins/5115491

Everything but the conduit NoHandle code runs in roughly 600-620ms, including the pure C version.

G


On Fri, Mar 8, 2013 at 10:13 AM, Alexander Kjeldaas <alexander.kjeldaas@gmail.com> wrote:



On Fri, Mar 8, 2013 at 9:53 AM, Gregory Collins <greg@gregorycollins.net> wrote:
On Fri, Mar 8, 2013 at 9:48 AM, John Lato <jwlato@gmail.com> wrote:
For comparison, on my system I get 
$ time cp input.dat output.dat 

real 0m0.004s
user 0m0.000s
sys 0m0.000s

Does your workstation have an SSD? Michael's using a spinning disk.


If you're only copying a GB or so, it should only be memory traffic.

Alexander
 

--
Gregory Collins <greg@gregorycollins.net>

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe





--
Gregory Collins <greg@gregorycollins.net>

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe