Commit 125fbbd
Merge #199
199: Optimizations for multiplication r=cuviper a=cuviper
Relevant benchmarks:
```
factorial_100 5,137 2,663 -2,474 -48.16% x 1.93
factorial_div_biguint 791,253 773,134 -18,119 -2.29% x 1.02
factorial_div_u32 766,341 748,398 -17,943 -2.34% x 1.02
factorial_mul_biguint 113,269 58,480 -54,789 -48.37% x 1.94
factorial_mul_u32 35,062 37,848 2,786 7.95% x 0.93
multiply_0 39 40 1 2.56% x 0.98
multiply_1 3,693 3,708 15 0.41% x 1.00
multiply_2 309,911 215,371 -94,540 -30.51% x 1.44
multiply_3 662,091 494,419 -167,672 -25.32% x 1.34
pow_bench 2,550,050 2,144,069 -405,981 -15.92% x 1.19
pow_bench_1e1000 1,332 1,071 -261 -19.59% x 1.24
pow_bench_1e10000 62,234 36,109 -26,125 -41.98% x 1.72
pow_bench_1e100000 2,530,757 1,134,613 -1,396,144 -55.17% x 2.23
pow_bench_bigexp 2,630,660 2,155,688 -474,972 -18.06% x 1.22
```
Co-authored-by: Josh Stone <cuviper@gmail.com>File tree
7 files changed
+207
-102
lines changed- benches
- src
- bigint
- biguint
- tests
7 files changed
+207
-102
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
354 | 369 | | |
355 | 370 | | |
356 | 371 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
33 | 62 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
40 | 66 | | |
41 | | - | |
42 | 67 | | |
43 | 68 | | |
44 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
846 | 846 | | |
847 | 847 | | |
848 | 848 | | |
849 | | - | |
850 | | - | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
851 | 852 | | |
852 | 853 | | |
853 | 854 | | |
| |||
0 commit comments