Skip to content

Commit 5778d25

Browse files
committed
Perhaps sensible thresholds?
1 parent b823bf9 commit 5778d25

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/libre/ast_compile.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,14 @@
3333
* The parameters here bail out if the number of alts or the length of any
3434
* particular string within an alt are below a threshold, especially because
3535
* [xyz] is so common. The exact values only represent cost approximately.
36-
* These are chosen just by trying it and seeing roughly how it goes.
36+
*
37+
* In practice I found it difficult to pick values for these, because for
38+
* the lower end of the scale it's hard to see a meaningful difference,
39+
* and for the upper end of the scale the time is dominated by
40+
* determinisation anyway.
3741
*/
38-
#define AC_COUNT_THRESHOLD 1
39-
#define AC_LENGTH_THRESHOLD 1
42+
#define AC_COUNT_THRESHOLD 5
43+
#define AC_LENGTH_THRESHOLD 5
4044

4145
#define LOG_LINKAGE 0
4246

0 commit comments

Comments
 (0)