Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

perl 5.8.0 perlio

by Anonymous Monk
on Jul 20, 2002 at 15:43 UTC ( #183607=perlmeditation: print w/ replies, xml ) Need Help??

If you don't know it already, perl 5.8.0 was released earlier this week. It now uses it's own IO subsystem (perlio) by default instead of the system's. I've already gleened one serious improvement from it... If you've been using String::IO or tied handles to create in-memory files, you should check out the ':scalar' layer.

my $buf; open( $fh, "+<:scalar", \$buf );
My early benchmarks show it to be 10x faster than a simple buffer created with tie and 20x faster than String::IO! I'm testing out a copy of Apache::Filter I hacked up to replace the tied handle with the ':scalar' layer and the improvement is quite dramatic:)

Comment on perl 5.8.0 perlio
Download Code
Re: perl 5.8.0 perlio
by vladb (Vicar) on Jul 20, 2002 at 17:04 UTC
    My early benchmarks show it to be 10x faster than a simple buffer created with tie and 20x faster than String::IO!

    Sounds interesting.. I'd appreciate it if you could post your benchmark code.

    I haven't yet looked at perl 5.8.0 but looking at comments made by other developers the improvements are quite exciting. For one, I believe that Perl's use of it's own IO subsystem in place of that provided by the underlying OS will make Perl even more platform independant.

    _____________________
    # Under Construction
      Well, yet again I've posted as the AM by mistake, and cannot edit my node:( So, one correction, everywhere I wrote String::IO, that should of course be IO::String.

      Now, here's the benchmarks...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://183607]
Approved by Courage
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (10)
As of 2014-10-20 11:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (75 votes), past polls