Repository navigation
Commit 5b7b120
Check for signals every 32nd iteration and once per Karatsuba step
With the 64-row batch, Karatsuba base cases (36-70 rows) mostly never
reached the check, so e.g. a 200k-digit product ran for seconds without
handling a signal. A 32-row batch makes every substantial base case
check, and k_mul() additionally checks once per recursion step.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>1 parent 6a4fe1b commit 5b7b120
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
4111 | 4111 | | |
4112 | 4112 | | |
4113 | 4113 | | |
| 4114 | + | |
| 4115 | + | |
| 4116 | + | |
| 4117 | + | |
| 4118 | + | |
| 4119 | + | |
| 4120 | + | |
4114 | 4121 | | |
4115 | 4122 | | |
4116 | 4123 | | |
| |||
0 commit comments