Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Optimise file line by line parsing, substitute SPLIT

by Tux (Canon)
on Jun 03, 2013 at 14:13 UTC ( [id://1036764]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -E'say join"\t",qw(1 aap 2 noot 3 mies 4 wim 5 zus 6) for 1..2_
    +000_000' > test.tsv
    $ wc -l test.tsv
    ...
    splt     3.38    56%     6%     --   -93%
    none    0.233  2156%  1429%  1347%     --
    $
    
  2. or download this
    $ perl -E'@x=("x" x 100) x 11;say join"\t",@x for 1..2_000_000' > test
    +.tsv
    $ perl test.pl
    ...
    tcsvbc   15.8    47%     --   -61%   -89%
    splt     6.13   280%   158%     --   -71%
    none     1.78  1206%   788%   244%     --
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1036764]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2024-04-23 17:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found