Skip to content

For fun I wanted to write a prime number calculator and see how much I could optimize the runtime. This is an ongoing experiment.

Notifications You must be signed in to change notification settings

nickisnt/PrimeNumberCalculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

PrimeNumberCalculator

For fun I wanted to write a prime number calculator and see how much I could optimize the runtime. This is an ongoing experiment.

I'm using gcc as the compiler and am using the -Ofast optimization flag. Finding primes between 1 and 10,000,001 takes 1 minute and 2 seconds on the M1 Macbook pro currently.

gcc -Ofast -o prime prime.c

About

For fun I wanted to write a prime number calculator and see how much I could optimize the runtime. This is an ongoing experiment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages