Skip to content

Latest commit

 

History

History

solution_1

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

IDL solution by KrizTioaN

Algorithm Faithfulness Parallelism Parallelism Bit count Bit count

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:

  1. One has the least, in terms of speed, favorable characteristics; loops are slow, really slow, in IDL ...
  2. One has more favorable characteristics and does things more the 'IDL-way'.

Run instructions

. run.sh

The script will check for and use IDL (license required) when available. Otherwise it will use free and open-source GDL.

Docker

No IDL or GDL? Run it with Docker.

docker build -t primes .
docker run --rm primes

Output

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