Repository navigation
Commit c21ed55
committed
automata: make MAX_POOL_STACKS user configurable
This exposes a knob inside of `regex-automata` (but not `regex`) that
permits end users to control how many cache lines are used inside of the
cache pool. Previously, this was always fixed to `8`, but using the
benchmark in #934 shows that this can cause performance to suffer when
the number of threads is greater than `8`.
In this commit, we not only expose it as user configurable, but we also
change the default to be `std::thread::available_parallelism()`. This
does increase memory usage for environments with higher core counts, but
it's still probably the better default. If this proves burdensome, we
can always roll the default back to `8`.
Fixes #12411 parent 2b52759 commit c21ed55
2 files changed
Lines changed: 107 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1919 | 1919 | | |
1920 | 1920 | | |
1921 | 1921 | | |
1922 | | - | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
1923 | 1926 | | |
1924 | 1927 | | |
1925 | 1928 | | |
| |||
2483 | 2486 | | |
2484 | 2487 | | |
2485 | 2488 | | |
| 2489 | + | |
2486 | 2490 | | |
2487 | 2491 | | |
2488 | 2492 | | |
| |||
3039 | 3043 | | |
3040 | 3044 | | |
3041 | 3045 | | |
| 3046 | + | |
| 3047 | + | |
| 3048 | + | |
| 3049 | + | |
| 3050 | + | |
| 3051 | + | |
| 3052 | + | |
| 3053 | + | |
| 3054 | + | |
| 3055 | + | |
| 3056 | + | |
3042 | 3057 | | |
3043 | 3058 | | |
3044 | 3059 | | |
| |||
3210 | 3225 | | |
3211 | 3226 | | |
3212 | 3227 | | |
| 3228 | + | |
| 3229 | + | |
| 3230 | + | |
| 3231 | + | |
| 3232 | + | |
| 3233 | + | |
| 3234 | + | |
| 3235 | + | |
| 3236 | + | |
| 3237 | + | |
| 3238 | + | |
| 3239 | + | |
| 3240 | + | |
| 3241 | + | |
| 3242 | + | |
| 3243 | + | |
| 3244 | + | |
| 3245 | + | |
| 3246 | + | |
| 3247 | + | |
| 3248 | + | |
| 3249 | + | |
| 3250 | + | |
| 3251 | + | |
3213 | 3252 | | |
3214 | 3253 | | |
3215 | 3254 | | |
| |||
3317 | 3356 | | |
3318 | 3357 | | |
3319 | 3358 | | |
| 3359 | + | |
3320 | 3360 | | |
3321 | 3361 | | |
3322 | 3362 | | |
| |||
3641 | 3681 | | |
3642 | 3682 | | |
3643 | 3683 | | |
3644 | | - | |
| 3684 | + | |
3645 | 3685 | | |
3646 | 3686 | | |
3647 | 3687 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
162 | 206 | | |
163 | 207 | | |
164 | 208 | | |
| |||
455 | 499 | | |
456 | 500 | | |
457 | 501 | | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
458 | 514 | | |
459 | 515 | | |
460 | 516 | | |
| |||
493 | 549 | | |
494 | 550 | | |
495 | 551 | | |
496 | | - | |
| 552 | + | |
497 | 553 | | |
498 | 554 | | |
499 | 555 | | |
| |||
847 | 903 | | |
848 | 904 | | |
849 | 905 | | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
850 | 914 | | |
851 | 915 | | |
852 | 916 | | |
| |||
0 commit comments