On Jul 10, 2013, at 11:47 AM, Bradley Lucier <lucier@math.purdue.edumailto:lucier@math.purdue.edu> wrote:
On 06/12/2013 01:07 PM, Bradley Lucier wrote:
Just for laughs and giggles, I decided to calculate 1,000,000,000 (yes, 9 zeros) digits of pi using Bakul Shah's Scheme program implementing the Chudnovsky algorithm. The computation used one CPU core:
model name : Intel(R) Xeon(R) CPU X5570 @ 2.93GHz
with a pretty good memory subsystem with 72GB of memory ...
leibniz-172% gsi chud2 Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 10, CPU time: 0.. Last 5 digits 26535. Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 100, CPU time: 0.. Last 5 digits 70679. Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 1000, CPU time: 0.. Last 5 digits 1989. Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 10000, CPU time: .020000000000000004. Last 5 digits 75678. Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 100000, CPU time: .340022. Last 5 digits 24646. Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 1000000, CPU time: 5.140321. Last 5 digits 58151. Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 10000000, CPU time: 83.765235. Last 5 digits 55897. Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 100000000, CPU time: 1327.790981. Last 5 digits 51592. Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 1000000000, CPU time: 41907.731069. Last 5 digits 45519.
This is the same program, run on my new desktop:
model name : Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
with 16GB of RAM, which seems to run 2-3 times as fast as the server in the math department. (Luckily, a new server will be up and running soon.)
Brad
firefly:~/programs/gambiteer> gsi chud2 Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 10, CPU time: 0.. Last 5 digits 26535. Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 100, CPU time: 0.. Last 5 digits 70679. Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 1000, CPU time: 0.. Last 5 digits 1989. Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 10000, CPU time: .012. Last 5 digits 75678. Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 100000, CPU time: .172. Last 5 digits 24646. Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 1000000, CPU time: 2.476. Last 5 digits 58151. Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 10000000, CPU time: 38.7. Last 5 digits 55897. Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 100000000, CPU time: 536.864. Last 5 digits 51592. Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 1000000000, CPU time: 14459.672. Last 5 digits 45519.
A new run on a MacBook Pro with M1 Ultra (64GB memory) on one processor:
[MacBook-Pro:~/programs/gambit] lucier% gsi -:m1000000 chud1 Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 10, CPU time: 1.419999999999963e-4. Last 5 digits 26535. Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 100, CPU time: 7.099999999999815e-5. Last 5 digits 70679. Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 1000, CPU time: 6.139999999999965e-4. Last 5 digits 1989. Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 10000, CPU time: .018569000000000002. Last 5 digits 75678. Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 100000, CPU time: .123237. Last 5 digits 24646. Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 1000000, CPU time: 1.440205. Last 5 digits 58151. Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 10000000, CPU time: 21.505972999999997. Last 5 digits 55897. Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 100000000, CPU time: 294.886941. Last 5 digits 51592. Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 1000000000, CPU time: 7714.255436. Last 5 digits 45519. [MacBook-Pro:~/programs/gambit] lucier% gsi -v v4.9.4-30-g4c9a0bc3 20220331205952 arm-apple-darwin21.2.0 "./configure 'CC=gcc-11' '--enable-single-host' '--enable-march=native' '--enable-multiple-versions' '--enable-shared' '--enable-dynamic-clib'"
So, it’s almost twice as fast as the 2013 i7-4770 (which was a sweet spot in historical Intel processor design in my opinion).
I’ll include the program here just for info.
Brad