Announcement

Collapse
No announcement yet.

how fast is your computer?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • devius
    replied
    24.06s <- Atom N270 @ 1,6GHz GCC 4.6 \m/

    Leave a comment:


  • Valerie60
    replied
    To be honest I can say even without all these scripts that my computer is rather fast and performs all the tasks I need great! Sp what for I need the exact numbers...

    Leave a comment:


  • DuSTman
    replied
    Originally posted by DuSTman View Post
    Code:
    [email protected] ~/primetest $ gcc -p primetest.c -o primetest -O3
    [email protected] ~/primetest $ ./primetest 1000000
    prime number 1000000: 15485863
    total time: 5.72
    That's with a core-i7 920 @2.6GHz, btw, and compiled with GCC version 4.3.4.

    Trying it with PGO yields a slightly better result:

    Code:
    [email protected] ~/primetest $ gcc -p primetest.c -o primetest --std=c99 -O3 -fprofile-use
    [email protected] ~/primetest $ ./primetest 1000000
    prime number 1000000: 15485863
    total time: 5.61

    Leave a comment:


  • DuSTman
    replied
    Code:
    [email protected] ~/primetest $ gcc -p primetest.c -o primetest -O3
    [email protected] ~/primetest $ ./primetest 1000000
    prime number 1000000: 15485863
    total time: 5.72

    Leave a comment:


  • BlackStar
    replied
    Every time I see algorithms like this implemented in C, I weep. Use something functional, save a few electrons.

    Also, Euler's Sieve FTW.

    Edit: Prime95 is a much better benchmark.

    Leave a comment:


  • jimerickson
    replied
    dual quad intel E5450
    64 GB ram
    1 TB hdd
    64 GB intel X25-E slc ssd
    gtx 480

    Leave a comment:


  • VoodoJ
    replied
    Mine is not as good as it could be.

    AMD 4x 3.2GZ
    6gb ram
    500 gb HDD.
    internal video.

    This system kills me when i'm doing video. to make 4 min video took me 3 hours.
    Still works fine though.

    Leave a comment:


  • that guy
    replied
    Originally posted by sabriah View Post
    Do you see that the MHz is at 1998 despite that it should be 3.00GHz.
    You're probably just running a CPU governor that underclocks your CPU when idle. Trying switching to "performance" if you want
    Code:
    echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    echo "performance" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
    Anyway, here's something interesting: on my E8400, I got 6.65 in -O3 (no other flag seems to effect the performance, including -march) and 6.44 using PGO, on GCC 4.4/4.5. First time I actually use PGO, as it's only good for benchmarks.

    Leave a comment:


  • NoEffex
    replied
    Code:
    [email protected]:~/Desktop/Download$ gcc nth.c -o nth
    [email protected]:~/Desktop/Download$ ./nth 1000000
    
    prime number 1000000: 15485863
    total time: 9.58
    
    [email protected]:~/Desktop/Download$ gcc -m32 nth.c -o nth
    [email protected]:~/Desktop/Download$ ./nth 1000000
    prime number 1000000: 15485863
    total time: 3.44
    Code:
    [email protected]:~/Desktop/Download$ clang nth.c -o nth
    [email protected]:~/Desktop/Download$ ./nth 1000000
    prime number 1000000: 15485863
    total time: 8.97
    
    [email protected]:~/Desktop/Download$ clang -m32 nth.c -o nth
    [email protected]:~/Desktop/Download$ ./nth 1000000
    prime number 1000000: 15485863
    total time: 3.32

    Leave a comment:


  • Shining Arcanine
    replied
    Originally posted by howlingmadhowie View Post
    it's actually barely faster (7.62s on my system) if you malloc the whole space in advance. i'd gestimate that about 99% of the time is spent calculating the modulus.
    Here is a patch that does that:

    Code:
    --- t.old       2010-03-06 23:38:48.579241698 -0500
    +++ t.c 2010-03-06 23:37:39.074240092 -0500
    @@ -23,7 +23,7 @@
       tofind=atoi(argv[1]);
     
       numfound=1;
    -  primes=malloc(sizeof(long));
    +  primes=malloc(sizeof(long)*totest);
       primes[0]=2;
       totest=2;
                                                                                           
    @@ -32,7 +32,6 @@                                                                      
         totest++;                                                                         
         if(isprime(totest)) {                                                             
           numfound++;                                                                     
    -      primes=realloc(primes, numfound*sizeof(long));                                  
           primes[numfound-1]=totest;                                                      
         }                                                                                 
       }
    You are right that all of the time is spent in the modulus. When I wrote my program 2.5 years ago, I went with the erathothenes sieve algorithm because it did not require that I calculate the moduli, which was a huge performance boost. It is possible to calculate the moduli using a square and multiple approach, but doing it efficiently would require O(m*n) auxillary memory and some dynamic programming, but I doubt that it would beat the erathothenes sieve.

    Leave a comment:

Working...
X