Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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:)

Replies are listed 'Best First'.
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?
[talexb]: Hmm .. fascinated to learn that there's no INT function in SQL Server, only FLOOR and CEIL. #interestingjobint erviewquestion
[Corion]: talexb: How about convert( decimal( 10,0 ), EXPR )) ? ;-D
[Corion]: On the upside, $work has published two openings for cow-orkers; we'll see whether someone wants to work here ;)

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2017-08-16 13:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (265 votes). Check out past polls.

    Notices?