Re: [PATCH] validate_failures.py: Fix performance regression

2013-02-06 Thread Bernhard Reutner-Fischer
On Fri, Dec 07, 2012 at 10:31:57AM -0500, Diego Novillo wrote: On Thu, Dec 6, 2012 at 1:12 PM, Bernhard Reutner-Fischer rep.dot@gmail.com wrote: def IsComment(line): Return True if line is a comment. - return line.startswith('#') + return bool(re.matches(#, line)) startswith() is a

Re: [PATCH] validate_failures.py: Fix performance regression

2012-12-17 Thread Diego Novillo
On Thu, Dec 13, 2012 at 10:12 AM, Bernhard Reutner-Fischer rep.dot@gmail.com wrote: On Fri, Dec 07, 2012 at 10:31:57AM -0500, Diego Novillo wrote: On Thu, Dec 6, 2012 at 1:12 PM, Bernhard Reutner-Fischer rep.dot@gmail.com wrote: @@ -210,12 +211,12 @@ def IsInterestingResult(line):

Re: [PATCH] validate_failures.py: Fix performance regression

2012-12-13 Thread Bernhard Reutner-Fischer
On Fri, Dec 07, 2012 at 10:31:57AM -0500, Diego Novillo wrote: On Thu, Dec 6, 2012 at 1:12 PM, Bernhard Reutner-Fischer rep.dot@gmail.com wrote: @@ -210,12 +211,12 @@ def IsInterestingResult(line): if '|' in line: (_, line) = line.split('|', 1) line = line.strip() - return

Re: [PATCH] validate_failures.py: Fix performance regression

2012-12-07 Thread Diego Novillo
On Thu, Dec 6, 2012 at 1:12 PM, Bernhard Reutner-Fischer rep.dot@gmail.com wrote: def IsComment(line): Return True if line is a comment. - return line.startswith('#') + return bool(re.matches(#, line)) startswith() is a better match here. def IsInclude(line): Return True if