Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Need to speed up many regex substitutions and somehow make them a here-doc list

by xnous (Sexton)
on Oct 02, 2022 at 13:00 UTC ( [id://11147214]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    wget http://www.astro.sunysb.edu/fwalter/AST389/TEXTS/Nightfall.htm
    html2text-cpp Nightfall.htm >nightfall.txt
    for i in {1..1000}; do cat nightfall.txt >>in.txt; done
    
  2. or download this
    #!/bin/bash
    
    ...
        sed 's/ used.* / use /gi' | \
        sed 's/ using.* / use /gi' \
    >|out-sed.dat
    
  3. or download this
    % time ./re.sh 
    real    0m5,201s
    user    0m43,394s
    sys    0m1,302s
    
  4. or download this
    #!/usr/bin/perl
    use strict;
    ...
        print $OUT "$_\n";
      }
    }
    
  5. or download this
    % time ./re1.pl 
    real    4m1,655s
    user    4m29,242s
    sys    0m0,380s
    
  6. or download this
    % time ./re2.pl 
    real    1m5,096s
    user    1m11,889s
    sys    0m0,524s
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-19 14:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found