2010/12/23 Iñaki Baz Castillo : >> Try it on a tmpfs mount. > > Yes, that would be my next test. Hummm, I get "non expected" results when using a tmpfs as destination for the copy. I attach a new test file which makes usage of IO splice in different ways ("manual", using IO objects and using file names). Results: Test data: - Source file size: 464 bytes - Number of iterations: 1 Results: - FileUtils.cp: 0.0004868507385253906 - FileUtils.copy_stream: 7.581710815429688e-05 - IO.splice (manual): 0.0004825592041015625 - IO.splice (using IO): 0.00017380714416503906 - IO.splice (using file names): 0.00012922286987304688 Test data: - Source file size: 464 bytes - Number of iterations: 100 Results: - FileUtils.cp: 0.005738258361816406 - FileUtils.copy_stream: 0.0026025772094726562 - IO.splice (manual): 0.038815975189208984 - IO.splice (using IO): 0.016385793685913086 - IO.splice (using file names): 0.009386062622070312 Test data: - Source file size: 1156222 bytes - Number of iterations: 1 Results: - FileUtils.cp: 0.0017499923706054688 - FileUtils.copy_stream: 0.0020220279693603516 - IO.splice (manual): 0.001650094985961914 - IO.splice (using IO): 0.001832723617553711 - IO.splice (using file names): 0.0017614364624023438 Test data: - Source file size: 1156222 bytes - Number of iterations: 100 Results: - FileUtils.cp: 0.20581936836242676 - FileUtils.copy_stream: 0.19777441024780273 - IO.splice (manual): 0.1709754467010498 - IO.splice (using IO): 0.19835829734802246 - IO.splice (using file names): 0.1958324909210205 -- Iñaki Baz Castillo