Interactive Data Language (IDL) implementations of the prime sieve algorithm. A free and open-source IDL compiler is available as GDL.
IDL is used in scientific data analysis, where its strength lies in vector and matrix operations. In many ways it is comparable to Matlab and its open-source free counterpart GNU Octave.
Two implementations are provided:
- One has the least, in terms of speed, favorable characteristics; loops are slow, really slow, in IDL ...
- One has more favorable characteristics and does things more the 'IDL-way'.
. run.sh
The script will check for and use IDL (license required) when available. Otherwise it will use free and open-source GDL.
No IDL or GDL? Run it with Docker.
docker build -t primes .
docker run --rm primes
IDL 8.8:
kriztioan_1bit;9;5.644735;1;algorithm=base,faithful=yes,bits=1
kriztioan_idlway;719;5.002732;12;algorithm=base,faithful=yes,bits=8
GDL 1.0.0-rc.3 git:
kriztioan_1bit;3;5.004834;1;algorithm=base,faithful=yes,bits=1
kriztioan_idlway;350;5.011078;6;algorithm=base,faithful=yes,bits=8