Measured exact multiplication of very large integers

All numbers below were measured on one CPU core of one free machine. Nothing here is estimated.

1,000,000,000 digits × 1,000,000,000 digits

quantityvalue
operand size1,000,000,000 decimal digits each
result digits2,000,000,016
total compute time681.4 s
stage timesprep 1.25 s; split 0.55 s; twelve forward NTTs 71.5–72.4 s per group of four; twelve pointwise+inverse passes 76.0–76.5 s per group of four; CRT 10.48 s; combine 2.74 s; decimal output (2.0 GB) 7.46 s
peak memory513 MB per NTT process, 65 MB in CRT, 33 MB in combine
cores used1
transform length2^27 = 134,217,728 points, on halves of 55,555,556 limbs
algorithmoperands split in half; four half-size NTT products in base 10^9 limbs with primes 2013265921 (g=31), 2281701377 (g=3), 3221225473 (g=5); CRT reconstruction; recombine by shift-and-add
result SHA-256c7d5e561948c4bcbf079c6526ebf8d7cf306b1b7f2b13bf17acadd1b9a88fb37
result first 30 digits381868291381675008543398244976
result last 30 digits022471954158618594078831060399
full recordresult_1e9.txt

Verification at the full size: five independent 61-bit primes, 5 of 5 match. The same split/combine path was checked against CPython's own big-integer multiply at 999,990 digits: identical decimal string.

600,000,000 digits × 600,000,000 digits

quantityvalue
operand size600,000,000 decimal digits each
result digits1,200,000,006
total compute time173.97 s
stage timesprep 0.76 s; six forward NTTs 17.85 / 18.27 / 17.69 / 17.78 / 18.25 / 18.24 s; three pointwise passes 0.66 / 0.70 / 0.74 s; three inverse NTTs 18.52 / 18.35 / 18.62 s; CRT 3.10 s; decimal output 4.44 s
peak memory513 MB per NTT process, 65 MB in the CRT pass
cores used1
transform length2^27 = 134,217,728 points
algorithmNTT in base 10^9 limbs, three NTT primes 2013265921 (g=31), 2281701377 (g=3), 3221225473 (g=5), CRT reconstruction
result SHA-25675ad50936ff64fba174fe151ae18300490b9e0c28b4a9f1ec6a7cdd9b9fd691e
result first 30 digits273239482756438836404523129062
result last 30 digits022471954158618594078831060399
full recordresult_600M.txt (fingerprint, first and last 500 digits, every stage time, verification)

Verification at the full size: for four independent 61-bit primes (2305843009213693951, 1000000000000000003, 999999999999999989, 4611686018427387847), (result mod p) equals (A mod p)(B mod p) mod p: 4 of 4 match. The same code path was checked against CPython's own big-integer multiply at 1,000,000 digits: identical decimal string, SHA-256 c87c2d67e07ce8ada18d16b6c34a2223f4ba9c1a7c1359d547b57579ea0607d7.

300,000,000 digits × 300,000,000 digits

quantityvalue
operand size300,000,006 digits each
result digits600,000,012
total time143.13 s
stage times44.041 + 45.059 + 43.382 s (three NTT passes), 10.647 s (CRT and output)
peak memory513 MB per NTT pass, 891 MB in the CRT pass
transform length2^26 = 67,108,864 points
primes469762049 (g=3), 2013265921 (g=31), 1811939329 (g=13)
result SHA-256759dca487949ad76c978722abaeeb081ccf9dd128ea5e8dcea5f2b986f039657
result first 30 digits160693123533759097559420021855
result last 30 digits823721103252050939256123070315

Verification at the full size: five 61-bit primes, 5 of 5 match. Independent float-FFT multiplication (numpy, base 10^4, float64) at 1,000,000 digits: identical digits. Exact equality with CPython at 1,000,000 digits: match.

Why the transform stays at 2^27

A single transform of 2^28 points fits in memory here (1,025 MB peak, measured), but exact CRT at that size needs three primes below 2^32 with a 2^28-th root of unity, and only two exist (3489660929 and 3221225473). So the billion-digit run splits each operand in half and combines four 2^27 products instead. Going past one billion digits would need the same trick one level deeper or a machine with more RAM.

No published world record is claimed in this category. The numbers above are our own measurements on this machine.

Sources: bigmul.c, ntt_mul3.c, verify.c, fftcheck.py