Skip to content

Latest commit

 

History

History
 
 

solution_1

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Euphoria solution by rzuckerm

Algorithm Faithfulness Parallelism Bit count Bit count

  • primes.ex uses integer for each sieve item
  • primes_bit.ex packs 32 sieve items in an integer. The bit manipulation functions are inlined in the sieve to improve performance.

Run instructions

Build the docker image with this:

./build.sh

You should only need to do this once. Run the docker image:

./run.sh

Output

On an Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz with 32 GB of memory on a Windows 10 desktop running a Ubuntu 22.04 VM in VirtualBox 6.1:

Passes: 388, Time: 5.00, Avg: 0.01288660, Limit: 1000000, Count: 78498, Valid: true

rzuckerm-bool;388;5.00;1;algorithm=base,faithful=yes

Passes: 3035, Time: 5.00, Avg: 0.00164745, Limit: 1000000, Count: 78498, Valid: true

rzuckerm-bit;3035;5.00;1;algorithm=base,faithful=yes,bits=1