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.
In reply to Re: File::Slurp Not As Efficient As OPEN / CLOSE
by salva
in thread File::Slurp Not As Efficient As OPEN / CLOSE
by ~~David~~
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |