in reply to File::Slurp Not As Efficient As OPEN / CLOSE

File::Slurp says in its description: Efficient Reading / Writing of Complete Files

Well, that affirmation could be just some propaganda from the module author.

Anyway, writing lots of very small files, you are benchmarking an extreme, non representative, case. Looking at the module source code it seems that it introduces some overhead in order to support all its features, but that overhead would probably become insignificant when your files reach a more usual length.

  • Comment on Re: File::Slurp Not As Efficient As OPEN / CLOSE

Replies are listed 'Best First'.
Re^2: File::Slurp Not As Efficient As OPEN / CLOSE
by blazar (Canon) on Oct 27, 2008 at 20:58 UTC
    Well, that affirmation could be just some propaganda from the module author.

    <ot>
    I personally believe that funnily enough if you check his past posts there, you'll find that Uri, who's a clpmisc regular, is actually often "accused" of (being rude to n00bz, but that's a clpmisc thing as a whole, and of) advertising his own module all the time...
    </ot>

    --
    If you can't understand the incipit, then please check the IPB Campaign.
Re^2: File::Slurp Not As Efficient As OPEN / CLOSE
by herveus (Prior) on Oct 28, 2008 at 14:32 UTC
    Howdy!

    The description is cleverly vague on how that efficiency is to be measured.

    It could as well be programmer efficiency as runtime efficiency.

    yours,
    Michael