Southperry.net
Bench test your PC! - Printable Version

+- Southperry.net (https://www.southperry.net)
+-- Forum: Social (https://www.southperry.net/forumdisplay.php?fid=14)
+--- Forum: The Speakeasy (https://www.southperry.net/forumdisplay.php?fid=54)
+--- Thread: Bench test your PC! (/showthread.php?tid=2918)



Bench test your PC! - AngelSL - 2008-08-30

Well, I was bored, so I made a C# app to calculate prime numbers.

.net 2.0 framework required.

Open it, enter:

1000000 (one million)

And wait for it to complete.

Then post the time it shows.

Tips: Close all background applications.

Note that it will get slower as the numbers get bigger.

And if it's taking up CPU, you should expect it!

Download:
http://www.mediafire.com/download.php?1itj42pyohw

..source:

 Spoiler



Bench test your PC! - Fiel - 2008-08-30

Code:
if (i == num)
                {
                    Console.WriteLine(num);
                }

That makes me cry. Writelines are very CPU intensive. Only the end result is needed. Sad

Code:
Stopwatch timer = new Stopwatch();
            timer.Start();
            int num;
            int i;
            for (num = 3; num <= cap; num += 2)
            {
                for (i = 2; i < num; i++)
                {
                    if (num % i == 0)
                    {    
                        break;
                    }
                }
            }

There are other optimizations you could use, but these are some pretty good ones for the moment. I guess it's also because I was trained in the ANSI standard. >_>


Bench test your PC! - BladeHavoc - 2008-08-30

Well it does give us a nice visual representation of the process :3.

My computer is slow. Still going through.

EDIT: Done. 17m 47 seconds.


Bench test your PC! - AngelSL - 2008-08-30

Okay, I re-ran it. Here;s my result.

0d, 0h, 5m, 13s taken for 1000000 as cap


Bench test your PC! - BladeHavoc - 2008-08-30

Using the optimized test or the original?

Your computer is much faster than mine either way Sad


Bench test your PC! - AngelSL - 2008-08-30

Original. The optimized wasn't faster at all.


Bench test your PC! - Kabanaw - 2008-08-30

3m 12s.


Bench test your PC! - Hazzy - 2008-08-30

3:58. :x
Now let's see who can run the program by hand fastest. Big Grin


Bench test your PC! - Fiel - 2008-08-30

10:52


Bench test your PC! - Manda - 2008-09-01

9m 47s. D:


Bench test your PC! - Russt - 2008-09-01

Lol, I actually had a TI-Basic (graphing calculator language) program that spit out prime numbers on my calculator... it took about an entire class period to get from 2 to 8000-ish, when I aborted it. I didn't bother to implement a stopping point, so it would've gone on forever until it ran out of battery.

5:25. What do you know, that's my birthday.


Bench test your PC! - Beloved - 2008-09-03

3:09 - without closing anything
2:51 - closed firefox, media player and a buncha other windows

lol 18 seconds difference.


Bench test your PC! - wobbufet - 2008-09-03

13:xx -_- I'm going to fully reïnstall windows soon, because my computer has been slow for the last 2 weeks, even though I clean it all the time...