RegEx and pointers

It’s nice to understand pointers and Regular Expressions…
I: Understanding file pointers:

Elapsed time is 273.039517 seconds. ->Elapsed time is 0.035172 seconds. (140 MB text file)

II: Understanding RegEx

Elapsed time is {too much- i stopped after 1min} seconds.->Elapsed time is 1.956197 seconds. ->Elapsed time is 0.024666 seconds.(parsing one line of the same file)

Gain on RegEx isn’t very big, but it’s important, because unfortunately, although Regular Expressions is powerful tool in text parsing and analysis, they are slow. And if they are written ambiguously or wrong, it takes s***load lot of time to process.



Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Mainīt )

Twitter picture

You are commenting using your Twitter account. Log Out / Mainīt )

Facebook photo

You are commenting using your Facebook account. Log Out / Mainīt )

Google+ photo

You are commenting using your Google+ account. Log Out / Mainīt )

Connecting to %s

%d bloggers like this: