- Notifications
You must be signed in to change notification settings - Fork5
Commit723476c
committed
Make a marginal performance improvement in predicate_implied_by and
predicate_refuted_by: if either top-level input is a single-element list,reduce it to its lone member before proceeding. This avoidsa useless level of AND-recursion within the recursive proof routines.It's worth doing because, for example, if the clause is a 100-elementlist and the predicate is a 1-element list then we'd otherwise stripthe predicate's list structure 100 times as we iterate through the clause.It's only needed at top level because there won't be any trivial ANDs belowthat --- this situation is an artifact of the decision to represent evensingle-item conditions as Lists in the "implicit AND" format, and that formatis only used at the top level of any predicate or restriction condition.1 parent4db44b4 commit723476c
1 file changed
+41
-7
lines changedLines changed: 41 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| |||
124 | 124 |
| |
125 | 125 |
| |
126 | 126 |
| |
| 127 | + | |
| 128 | + | |
| 129 | + | |
127 | 130 |
| |
128 | 131 |
| |
129 | 132 |
| |
130 | 133 |
| |
131 | 134 |
| |
132 |
| - | |
133 |
| - | |
134 |
| - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
135 | 152 |
| |
136 | 153 |
| |
137 | 154 |
| |
| |||
165 | 182 |
| |
166 | 183 |
| |
167 | 184 |
| |
| 185 | + | |
| 186 | + | |
| 187 | + | |
168 | 188 |
| |
169 | 189 |
| |
170 | 190 |
| |
171 | 191 |
| |
172 | 192 |
| |
173 |
| - | |
174 |
| - | |
175 |
| - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
176 | 210 |
| |
177 | 211 |
| |
178 | 212 |
| |
|
0 commit comments
Comments
(0)