This is an implementation in Standard ML.
Execute the following from this directory:
sml build.sml
sml @SMLload=primes.x86-linux
Execute the following from this directory:
mlton -link-opt '-static' primes.mlb
./primes
With a recent enough version of the mlton compiler (since release 20180207) llvm can be used for code generation. If the tools llvm-as
, opt
, llc
are available in the compilation environment then this option can be used to compile a faster sieve program.
Execute the following from this directory:
mlton -link-opt '-static' -codegen llvm primes.mlb
./primes
A Dockerfile has been provided.
NotMatthewGriffin_SML;2181;5.001;1;algorithm=base,faithful=yes,bits=1