jamadden / mrab-regex-hg

Automatically exported from code.google.com/p/mrab-regex-hg
0 stars 2 forks source link

Patch to restore speed lost in commit 7abd9f9bb1 #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The attached diff against c0186afe8c50 restores the speed lost in 7abd9f9bb1 
for me (25% faster on my regression tests).  In addition, all my tests still 
pass without error.

Looking at the diff, I confirmed empirically that it's the conditional:

if (pattern->repeat_info[i].inner)

that seems to slow everything down.  I don't why this test and dereference 
would be so expensive;  it might very well be a gcc bug (I haven't compared the 
generated assembly yet).

Original issue reported on code.google.com by aquara...@gmail.com on 6 Jan 2011 at 2:02

Attachments:

GoogleCodeExporter commented 9 years ago
The guard rework in 96b2b2478c fixes the performance issue for me.  You can 
close this.

Original comment by aquara...@gmail.com on 9 Jan 2011 at 11:27

GoogleCodeExporter commented 9 years ago
Thanks for the feedback.

Original comment by re...@mrabarnett.plus.com on 9 Jan 2011 at 11:36