Generating Primes

Hey guys,

first of all, I just managed to get a hold of a new i7-Quad Core 3.0GHz, 8GB RAM Windows 7 computer the other day (it lacks a graphics card, so I can’t play Battlefield D:), which means I can program stuff outside of a Virtual Machine (thank god), so expect more releases of software. I haven’t added one thing to Drug Lab at all since last update, but alas — I’ll finish it eventually.

Enough babbling, I have created a Prime Generator (expect tutorial), which is a program that generates, well, primes. On my brand new computer, using roughly 20% of it’s CPU, it generated 2.076.343 primes in a little over 12 hours. The highest prime being 3,38E+007 (33.773.261).

During my prime generation, I had the program write down what number prime (and prime) it was at each passing minute. Now, I’ve done a little bit of graphing and came up with these two graphs:

1) 12 hour test – I basically let the program run for 12 hours. This is the graph showing that:

graph showing that it goes slower the longer it runs

2) 1 hour comparison – I let the program run for an hour on two machines (one being my new, one being my old). This is the graph comparing the two:

graph showing the comparison between my new and old computer.

Download here:


C# Project:

…and for the paranoid ones:




Comment on this article

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s