develooper Front page | perl.perl5.porters | Postings from October 2003

Re: new slurp module

Thread Previous | Thread Next
Uri Guttman
October 24, 2003 02:56
Re: new slurp module
Message ID:
>>>>> "NI" == Nick Ing-Simmons <> writes:

  NI> I have a feeling that for 5.7+ doing the slurp at PerlIO level would be 
  NI> a win (:mmap sort of does that for read, but whether it really wins 
  NI> depends on OS's mmap() efficiency and whether file is local or NFS).

if the OS uses mmap underneath the i/o (solaris does IIRC), then sysread
will do the same as an mmap call and mem copy to the user's buffer. so i
don't think it will be that much faster. and you still need to do some
processing for binmode stuff or splitting on lines. so i don't think any
work in that direction should be done unless it is easy and can provide
a similar api.


Uri Guttman  ------  --------
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About