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:

Program: http://dl.dropbox.com/u/19633784/Prime%20Generator.exe

C# Project: http://dl.dropbox.com/u/19633784/Prime%20Generator.zip

…and for the paranoid ones:

Jottihttp://virusscan.jotti.org/en/scanresult/173141348217f01d4973c6e2972fa48ff7a6beac

VirusTotalhttps://www.virustotal.com/file/0c91dccfd145c8b1f863bbc27eceac992d2c47a140208c415cc900bae1479e38/analysis/1329922562/

Advertisements

Comment on this article

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s