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.
-
Notifications
You must be signed in to change notification settings - Fork 0
manusandoval05/prime-numbers
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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 0
No packages published