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

Re: new slurp module

Thread Previous | Thread Next
From:
Uri Guttman
Date:
October 24, 2003 02:56
Subject:
Re: new slurp module
Message ID:
x7llrb9cyq.fsf@mail.sysarch.com
>>>>> "NI" == Nick Ing-Simmons <nick.ing-simmons@elixent.com> 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

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About