Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^7: Suggestion for regular expression speed improvement.

by demerphq (Chancellor)
on Jun 15, 2009 at 17:10 UTC ( #771719=note: print w/replies, xml ) Need Help??


in reply to Re^6: Suggestion for regular expression speed improvement.
in thread Suggestion for regular expression speed improvement.

Well no, its just that if you use a big huge complex machine to do the work that you could do with a knife that you arent being efficient.

And split does use the regex engine, its just it uses it in special ways to be efficient.

---
$world=~s/war/peace/g

  • Comment on Re^7: Suggestion for regular expression speed improvement.

Replies are listed 'Best First'.
Re^8: Suggestion for regular expression speed improvement.
by bala.linux (Novice) on Jun 15, 2009 at 18:11 UTC
    Yes. My initial idea was to keep CSV, RE parsing separate but I thought may be If could get the same performance from RE, then need not to have a CSV parser. But now I understand that is not possible to think of. So, need to switch back to my old approach where I do two parsing separately. So, from the user interface user will have simple/advanced parsing modes. Thanks for your suggestion.

      Dont forget unpack. For fixed width fields its pretty much the fastest choice you have. And many logfiles are fixed width.

      ---
      $world=~s/war/peace/g

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://771719]
help
Chatterbox?
[oiskuu]: Someone needs to re-read How do I use the power of consideration responsibly? carefully. Consideration is not intended for stamping out humor, AFAIK.
[oiskuu]: E.g. Re^3: Big thank you to the Perl community. is surely dry humor (not mine). Don't they teach humor in german schools!?
[LanX]: you don't see the whole picture
[LanX]: But reu germans have no humor, better to refrain from this site till the troll is gone...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (13)
As of 2017-04-27 19:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (512 votes). Check out past polls.