in reply to •Re: Replicate Code
in thread Replicate Code

Let's see with 100000 iterations:

Linux: 3% - 5% slower than File::Copy
Win32: 25% - 30% faster than File::Copy

-inno

Replies are listed 'Best First'.
•Re: Re: •Re: Replicate Code
by merlyn (Sage) on Sep 20, 2002 at 18:37 UTC
      You were right!

      After running a number of brain numbing tests, it appears that at a file larger than approx 1k, File::Copy takes the flag (and runs with it). Let alone the fact that print's taking the data line by line. (I also tested syswrite, and when used in a similar way, it is still slower.)

      I guess I'm off to change my scripts now. Oh wait, nevermind, they don't get replicated at that rate anyways (just when they need fixing). But I'll be sure to use File::Copy from now on.

      Thanks,
      -inno