laurikari / tre

The approximate regex matching library and agrep command line tool.
Other
797 stars 133 forks source link

Simplify AST expansion #99

Closed dag-erling closed 1 month ago

dag-erling commented 4 months ago

Improved performance of retest with the patches in this PR (each data point is the time taken to run 10 times, lower is better):

x before
+ after
+------------------------------------------------------------------------------+
|   +                                                               x          |
|   +  +   +  +                                            x        x      x   |
|+  +  +   +  +                                            x     x  x   x  x  x|
|  |___MA___|                                                 |_____MA_____|   |
+------------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  10          3.63          3.69          3.66         3.661   0.020248457
+  10          3.45          3.49          3.47         3.471   0.013703203
Difference at 95.0% confidence
    -0.19 +/- 0.0162441
    -5.18984% +/- 0.428046%
    (Student's t, pooled s = 0.0172884)

Improved performance of wretest with the patches in this PR (each data point is the time taken to run 10 times, lower is better):

x wbefore
+ wafter
+------------------------------------------------------------------------------+
|              +                                                   x           |
|         + +  +                                                x  x x  x      |
|+  +     + +  +  +                                             x  x x  x     x|
|     |____AM____|                                              |___MA___|     |
+------------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  10          3.68          3.73         3.695         3.698   0.015491933
+  10          3.46          3.52           3.5         3.496   0.018973666
Difference at 95.0% confidence
    -0.202 +/- 0.0162743
    -5.46241% +/- 0.430629%
    (Student's t, pooled s = 0.0173205)