On 7/18/07, Kevin Quick <[EMAIL PROTECTED]> wrote:
Presumably it's faster to let the System.Directory.copyFile perform the file copying than working through the PackedString and the IO monad. My testing didn't show any real timing difference, but it may have less effect on memory/GC issues and just seems like the right thing to do...
I'm trying to understand why System.Directory.copyFile would be preferred. Isn't it implemented in Haskell too? Isn't bytestring (or rather PackedString) IO heavily optimized and on par with C? I did a quick google for the file that defines copyFile and I found an old copy in the fptools cvs that makes me think it is implemented in Haskell: http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libraries/base/System/Directory.hs?rev=1.59;content-type=text%2Fplain Kevin, have you tried a benchmark with a, say, 256mb file (or bigger)? What was your timing example? Did you try to measure memory consumption at all? Can you provide any evidence that one uses more or less memory than the other? Thanks, Jason _______________________________________________ darcs-devel mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-devel
