Skip to content

The objective of this program is simple. To find prime numbers as fast as possible.

Notifications You must be signed in to change notification settings

manusandoval05/prime-numbers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

prime-numbers

The objective of this program is simple. To find prime numbers as fast as possible. I originally developed this algorithm in python. However, I would really like to know how efficient it is. The program is very lightweight, aproximately 700 bytes and only requires one dependancy to run: pip install bitarray. I propose two solutions. main.py is the least efficient but the most fair. It analyzes each and every number from 2 to the length of the array until turning every possible factor into false. optimal.py works fairly similar but already knows that every multiple of 2 is not a prime number, so starts with 3 as a factor. This makes optimal.py two times as fast in calculating prime numbers up to 10,000,000. Nevertheless, I am not sure how valid it is to to do this. I think it is a nice experiment and I am looking forward to developing this in C#. I would like to know your opinions.

Do not hesitate to propose a commit, a fork, start a branch or give a comment in the discussion. Solutions for any programming language are accepted. Just commit the solution in a different folder called prime-numbers-(short for language), to keep everything organized and segmented.

About

The objective of this program is simple. To find prime numbers as fast as possible.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published