The number π calculation by spigot algorithm benchmark

The table below consists of the best results for the listed computers. It is open for the further expansion. So if anybody has faster implementation of spigot algorithm for one of systems listed below then please inform the author of this page (to vol.litwr at gmail dot com) and it should be updated. The same is true for the results of other systems missed in the table.

The results are time intervals in seconds for the calculation of 100, 1000, 3000 digits. They also contain the upper limits to the number of digits for the programs used. The data are sorted by time for 3000 digits.

Every program is satisfying four restrictions: 1) it measures time; 2) it uses an OS function to print digits; 3) it uses less than 64 KB RAM for the code and data; 4) it utilizes all available RAM below 64 KB limit to get the maximum number of calculated digits, so it is forbidden to restrict artificially the maximum number of digits.

ComputerOSProgram
version
DigitsMax
digits
Emulator used and its quality
10010003000
Acorn RiscPC StrongARM @203MHzRiscOSarm2-10.000.21.59144real iron (thanks to paulv)
VAX 7000-640OpenVMS 7.3vax-vms-20.010.53.89228real iron (thanks to to LCM+L)
VAX 4000 model 100AOpenVMS 6.1vax-vms-20.010.54.79228real iron (thanks to DECtechGuy)
MicroVAX 3100 model 85 @62.5MHzOpenVMS 7.3vax-vms-20.010.76.99228real iron (thanks to to g4ugm)
VAXstation 4000 model 60OpenVMS 7.3vax-vms-20.031.28.79228real iron (thanks to to cruff)
A410/1 ARM3 @36MHzRiscOSarm2-10.011.19.79144real iron (thanks to paulv)
PS/2 Model 85 486SX @33MHzDOSpc386-50.011.210.49228real iron (thanks to to RadRacer203)
VAX 4000 VLCOpenVMS 7.3vax-vms-20.042.117.19228real iron (thanks to to g4ugm)
IBM PC Clone 386DX @25MHzDOSpc386-50.032.1189272real iron
IBM PC Clone 386DX @25MHzDOSibmpc-50.032.1189264real iron
Acorn A3020RiscOSarm2-10.043.531.19144real iron (thanks to danielj)
Amiga 1200/PAL with fast RAMWBamiga1200-40.094349256corrected FS-UAE 2.6.2 (almost high)
IBM PC Clone 386DX @12.5MHzDOSpc386-50.054359272real iron
IBM PC Clone 386DX @12.5MHzDOSibmpc-50.054.2369264real iron
Amiga 1200/PALWBamiga1200-40.124.8379256real iron (thanks to cyberfred91 & Thelemorf)
Amiga 1200/PALWBamiga-40.145.4439252real iron (thanks to cyberfred91 & Thelemorf)
BBC A305RiscOSarm2-10.065.1459144real iron (thanks to sirbod)
Acorn Archimedes 440/1RiscOSarm2-10.065.1459144real iron (thanks to steve3000)
ARM Evaluation system @6.67MhzROM OSarm1-40.075.8529148real iron (thanks to BigEd) & estimation
IBM PC 5170 AT 8MHz VGADOSibmpc-50.117.1609264real iron (thanks to modem7) & estimation
VAX 11/780-5OpenVMS 7.3vax-vms-20.117619228real iron (thanks to LCM+L)
IBM PC Clone 386DX @6.25MHzDOSibmpc-50.118699264real iron
IBM PC 5162 XT/286 VGADOSibmpc-50.118.2719264real iron (thanks to per) & estimation
Acorn Master 512 (TUBE 80186 @10MHz)DOSmsdos-5-master5120.148.7759264real iron (thanks to george.h) & estimation
IBM PC 5170 AT 6MHz CGADOSibmpc-50.2110.2839264real iron (thanks to modem7) & estimation
Commodore SuperCPU-64/PALROM Basicscpu64-50.19.7877024VICE Version 2.4.22 (high)
Commodore SuperCPU-64/NTSCROM Basicscpu64-50.110907024VICE Version 2.4.22 (high)
AT&T PC 6300 / Olivetti M24 (NEC V30)DOSibmpc-50.2211.8989264real iron (thanks to pietja)
microPDP-11/83RT11SBrt11-eis-50.1411.4102up to 6580real iron (thanks to form) & estimation
Compaq Deskpro 1 (NEC V30 @7.14MHz)DOSibmpc-50.22121039264real iron (thanks to resman)
PDP-11/70Unix v7pdp11-unix7-eis-10.1711.9104up to 7312real iron (thanks to LCM+L)
HP 200LX (Palmtop)DOSibmpc-50.3815.91309264real iron (thanks to rosaage)
Commodore SuperCPU-64/PALROM Basicc64-90.1514.91336360VICE Version 2.4.22 (high)
Commodore SuperCPU-64/NTSCROM Basicc64-90.1515.21366360VICE Version 2.4.22 (high)
Amiga 500/PAL + fast RAMWBamiga-40.4219.71649252FS-UAE 2.6.2 (high)
Amiga 500/PALWBamiga-40.44201679252FS-UAE 2.6.2 (high)
BBC Micro (TUBE Acorn 32016 @6MHz)Pandorabbc-pandora-20.2421.31909188real iron (thanks to Chris) & estimation
BBC Micro (TUBE Acorn 32016 @6MHz)PanOSbbc-panos-20.2821.61919264real iron (thanks to Chris) & estimation
MSX turbo RROM Basicmsx-30.2522.11983264openmsx 0.10.1 (high)
microPDP-11/83RT11SBrt11-noeis-50.2622.5202up to 6500real iron (thanks to form) & estimation
IBM PC 5160/XT (NEC V20)DOSibmpc-50.4425.22139264real iron (thanks to RadRacer203)
AT&T PC 6300 / Olivetti M24DOSibmpc-50.38252179264real iron (thanks to Trixter)
PDP-11/70Unix v7pdp11-unix7-noeis-10.3224.8219up to 7164real iron (thanks to LCM+L)
Panasonic Exec Parter FT-70DOSibmpc-50.33262299264real iron (thanks to RadRacer203)
Sharp PC-7000DOSibmpc-50.4936.13129264real iron (thanks to RadRacer203)
PDP-11/34ART11 5.01 XMrt11-eis-50.536.7321up to 6580real iron (thanks to elb)
Dragon 32 (6309 CPU)*ROM Basicdragon-6309-30.4441.73743176real iron (thanks to robcfg)
IBM PC 5150 MDADOSibmpc-50.6547.64079264real iron (thanks to modem7) & estimation
Tiki-100 (8088 board)DOSmsdos-5-tiki1000.8454.44719260real iron (thanks to per) & estimation
BBC Micro (TUBE 6502 @4MHz)ROM Basicbbc-50.7877.2691up to 3216real iron (thanks to BigEd and Kieran) & estimation
VAX 11/730BSD 4.3vax-bsd-11.587.27379244real iron (thanks to LCM+L)
BBC Micro (TUBE Acorn z80 @6MHz)ROM Z80 Basicbbc-z80-31.0596.78666252real iron (thanks to BigEd)
BBC Micro (TUBE Acorn z80 @6MHz)CP/Mcpm22bios-7-acorn1.0696.78678220real iron (thanks to BigEd) & estimation
BBC Micro (TUBE 6502 @3MHz)ROM Basicbbc-51.07106.4952up to 3216real iron (thanks to BigEd and hoglet) & estimation
PDP-11/34ART11 5.01 XMrt11-noeis-51.42122.41090up to 6500real iron (thanks to elb)
Commodore +4/PALROM Basicplus4-101.48143.512837716real iron
BBC Micro (TUBE Torch z80 @4MHz)CPNcpm22bdos-7-torch1.62145.31300up to 8740real iron (thanks to danielj)
BBC MicroROM Basicbbc-51.61157.81411up to 3216real iron (thanks to BigEd and hoglet) & estimation
Dragon 32*ROM Basicdragon-41.72157.514143100real iron (thanks to robcfg)
Commodore 128/NTSCROM Basicc128-91.65159.414255044VICE Version 2.4.22 (high)
Commodore 128/PALROM Basicc128-91.7216614845044VICE Version 2.4.22 (high)
ZX Spectrum 48kROM Basiczx-11.9171.11529up to 4400fuse version 1.1.1 (high)
Amstrad CPC6128ROM Basiccpc-52.04174.51556up to 5536ep128emu version 2.0.9.1 (very high)
Tiki-100KP/Mcpm22bios-7-tiki1002.04175.715677636real iron (thanks to per) & estimation
Commodore +4/NTSCROM Basicplus4-101.83177.415867716plus4emu version 1.2.9.2 (very high)
Amstrad CPC6128CP/M 2.2cpm22bios-7-cpc61282.16183.116315988ep128emu version 2.0.9.1 (very high)
Amstrad CPC6128CP/M 3cpc-cpm3-62.36191.51697up to 8660ep128emu version 2.0.9.1 (very high)
Amstrad PCW8256CP/M 3cpm22bdos-7-pcw82562.09191.11712up to 8624real iron (thanks to habi) & estimation
MSX 1, 2, 2+ROM Basicmsx-32.27205.61841≈3000openmsx 0.10.1 (very high)
MSX 1, 2, 2+MSX DOScpm22bdos-7-msx2.42101876up to 7488openmsx 0.10.1 (very high)
БK0011 (PDP-11 architecture)БK0010 OSbk11-42.68242.121884412BK2010 (Java) 0.5-release (medium) & estimation
БK0010 (PDP-11 architecture)ROM Monitorbk10-53.13273.324463824BK2010 (Java) 0.5-release (high)
БK0011 (PDP-11 architecture)RT11SJrt11-noeis-53.34288.82606up to 5452BK2010 (Java) 0.5-release (medium) & estimation
Commodore 64/NTSCROM Basicc64-93.05301.626996360VICE Version 2.4.22 (high)
Commodore 64/PALROM Basicc64-93.17313.228026360VICE Version 2.4.22 (high)
Commodore 128/NTSC z80CP/M 3cpm22bdos-7-c1284.2358.53194up to 8184VICE Version 2.4.22 (high)
Commodore 128/PAL z80CP/M 3cpm22bdos-7-c1284.3372.13316up to 8184VICE Version 2.4.22 (high)

This algorithm speed depends very much on the speed of integer division. So systems with hardware division have a big advantage.

*The results are for CPU @1.78MHz. At this clock automatic DRAM regeneration doesn't work so it is possible that some hardware and software can't work with this speed. So, for normal system work, the maximum clock frequency is about 1.34 MHz, or 75% of that that used for the results given in the table.

The results above allow to calculate CPU efficiency for 1 Mhz. The next table contains approximate values of efficiency reciprocals (ER). These values are calculated by multiplication of the time of the calculation of 3000 digits by the CPU frequency. The ER values are gotten for pi-spigot which uses base 16-bit integer arithmetic. The best ER value for each CPU is taken.
RankCPUER
StrongARM300
80486340
KA52/NVAX340
ARM1350
KA66A/NVAX+360
ARM2360
ARM250370*
KA48/SOC430
NVAX430
80286430
80386440
VAX-11/780-5460
68020480
KA46/Mariah480
6309670
NEC V30730
80186750
NEC V201020
Hornet11030
320161140
680001160
R8001420***
KD11-EA1600
80861640
KB11C1730
658161740
J111840
80881940
68092520
VAX-11/7302730
65022760
Z805200
K1801BM17340**

* the ARM250 shows a bit slower performance than the ARM1 because it has more delays with RAM at A3020
** the tested systems use a very slow RAM interface, with the pefect one the speed will be 4700
*** its internal frequency is 4 times higher, this gives us ER=5680, i.e. more than for the Z80
1 it is a 80186 compatible processor with low power consumption

The next table contains the details about the tested systems in the chronological order.

SystemYearCPU
DEC PDP-11/701975KB-11C 16.7 MHz
DEC PDP-11/34A1978KD11-EA ≈5 MHz
IBM PC 515019818088 4.77 MHz
BBC Micro19816502 2 MHz
ZX Spectrum 48k1982z80 3.5 MHz
Dragon-3219826809 ≈0.89–1.78 MHz
VAX-11/7301982VAX-11/730 3.7 MHz
Z80 Torch 2nd processor1982z80 4 MHz
Commodore 6419826502 ≈1 MHz
MSX1983Z80 3.58 MHz
IBM PC 5160/XT19818088 or V20 4.77 MHz
Commodore +419846502 ≈0.9-2.2 MHz
VAX-11/7851984VAX-11/780-5 7.52 MHz
Olivetti M2419838086 8 Mhz
AT&T PC 630019838086 7.14 Mhz
6502 Acorn 2nd processor19846502 3 MHz
Z80 Acorn 2nd processor1984z80 6 MHz
Compaq Deskpro Model 119848086 8 MHz
IBM PC 5170198480286 6 MHz
Tiki-1001984z80 4 MHz, optional 8088 4 MHz
Commodore 12819856502 ≈2 MHz, z80 ≈2 MHz
32016 Acorn 2nd processor198532016 6 MHz
Amstrad CPC61281985z80 4 MHz
Amstrad PCW82561985z80 4 MHz
Amiga 1000198568000 7.1 MHz
БK00101985K1801BM1 3 MHz
Sharp PC-700019858086 7.37 MHz
Panasonic Executive Partner FT-7019858086 7.16 MHz
Acorn 2nd processor for BBC Micro19866502 4 MHz
ARM Evaluation system1986ARM1 6.67 MHz
Acorn BBC Master 512198680186 10 MHz, 6502 2 MHz
IBM PC 5170198680286 8 MHz
IBM PC 5162 XT/286198680286 6 MHz (0WS RAM)
BBC Archimedes 3051987ARM2 8 MHz
microPDP-11/831988J11 18 MHz
Acorn Archimedes 440/11989ARM2 8 MHz
БK00111989K1801BM1 4 MHz
MSX turbo R1990R800 7.16 MHz (28.64 MHz)
IBM PC Clone 0WS RAM1991AMD 80386DX 6.25/12.5/25 MHz
VAX 4000 VLC1991KA48/SOC 25 MHz
VAXstation 4000/601991KA46/Mariah 55 MHz
Acorn A30201992ARM250 12 MHz
VAX 4000 Model 100A1992KA52/NVAX 72 MHz
Amiga 1200199268020 14.2 MHz
IFEL board for Archimedes1992ARM3 36 MHz
VAX 7000-6401992KA66A/NVAX+ 90.9 MHz
IBM PS/2 Model 85199280486 33MHz
HP 200LX199480186 "Hornet" 7.91Mhz
MicroVAX 3100 model 851994NVAX 62.5 MHz
Acorn RiscPC1996StrongARM 203 MHz
Commodore SuperCPU-64199665816 20 MHz

The next table contains the sizes of the programs.
ProgramSize
pc386-5603
msdos-5635–640
pdp11-unix7-eis-1636°
ibmpc-5660
dragon-6309-3281+496=777*
vax-bsd-1816°
amiga1200-4868
rt11-eis-3894**
amiga-4904
vax-vms-2915**
bbc-pandora-2992
bbc-panos-21044
pdp11-unix7-noeis-11258°
dragon-4812+489=1301*
bk11-41448
bk10-51448
rt11-noeis-51490**
arm2-11504
arm1-41680
scpu64-51994
bbc-z80-31792+292=2084*
msx-31799+460=2265*
cpm22bios-72270–2283
cpc-cpm3-62288
cpc-51804+579=2383*
cpm22bdos-72266–2548
zx-14666***
bbc-56052+395=6447*
plus4-106531
c64-96597
c128-96597
* it is a sum of Asssember + Basic code sizes.
** it is a size of the pure code without a loader
*** it is a size of the TAP-file
° it is a size of the assembler + C code without a loader and C-libraries


Download the latest sources and executables (v27 [153 KB]) pack.

Sources Archive