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

What size file? What was your testing methodology? I bet on a huge file, File::Copy wins every time.

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
Re: •Re: Re: •Re: Replicate Code
by innominate (Beadle) on Sep 20, 2002 at 20:42 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