Repository navigation
Commit f30c050
test(web): the backtracking audit measures work, not wall time
"no pattern backtracks badly on 500 characters" failed under full-suite
load: it required every pattern to run in under 25 ms of wall time. Each
pattern's cost is now the fastest of three runs, compared with a linear
scan of the same string timed the same way in the same run; it fails
only when it is both over 10 ms and over 500 linear scans. The table's
worst is about 1.3 ms / 110 scans. A self-test, and a temporary
\b3.*ne.*ne.*?acts added to the table locally (about 29 ms / 2,300
scans, failed as BOOKS 108; reverted), show it still catches a pattern
that backtracks badly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent c26dc42 commit f30c050
1 file changed
Lines changed: 28 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
103 | 126 | | |
104 | 127 | | |
105 | 128 | | |
106 | 129 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
| 130 | + | |
| 131 | + | |
111 | 132 | | |
112 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
113 | 137 | | |
0 commit comments