On Tue, 14 Jun 2005 15:09:47 +0700, Beast wrote 
in <[EMAIL PROTECTED]>:
> 
> Supose I want to parse a big log file (~500MB/4mil lines), which one
>  is faster and use less memory:
> 
> $ ./parser.pl logfile.log
> $ grep 'Jun 14 03:' | ./parser.pl

IMHO, perl('s regex engine) alone is faster and use less memory.

> if(/^$in_time/) {

It's much better to use 'o' switch, like:
  if(/^$in_time/o) {

-- 
Takumi Yamane <[EMAIL PROTECTED]>

--
Unsubscribe mailto:[EMAIL PROTECTED]
Archive     http://lists.ee.ethz.ch/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi

Reply via email to