Matrix multiply

Normal matrix multiply

double a[N][N],b[N][N],c[N][N] ;

void normal(){
   int i,j,k;
   for (i=0;i<N;i++){
      for (j=0;j<N;j++){
         c[i][j] = 0.0;
         for (k=0;k<N;k++){
            c[i][j] += a[i][k]*b[k][j];
         }
      }
   }
}

Download : http://gd.tuwien.ac.at/perf/benchmark/aburto/mm/mm.c

Compile : gcc mm.c -O -DUNIX -DN=1400 -o mm

Launch 10 times : mm -n and give mean time.

Results

Name CPU Type CPU Freq L2 Cache Time
Meta Intel Core 2 Duo 3.16 GHz 6144 KB 16.71 (Win32, Cl.exe)
MacBook Intel Core 2 Duo 2.20 GHz 4096 KB 22.51
micron Core 2 Duo LV 1.60 GHz 4096 KB 32.64 (Win32, Cl.exe)
pluton Opteron 250 2.40 GHz 1024 KB 43.79
kant AMD Athlon XP 1900+ 1.60 GHz 256 KB 87.29
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki