Constat� �a hier d�j� un opty 185 � 3003Mhz met environ 0.750s
Je vois pas pourquoi �a serait � refaire, les cpu font la m�me chose.
Par contre je vais pas dire que c'est repr�sentatif des perfs g�n�rales, c'est un bench bien particulier, calcul de factoriel 99999999.
Donc c'est du calcul entier exclusivement, je crois que amd roxx dans ce domaine nan?
Et aussi pour chaque r�sultat interm�diaire je le range dans un tableau en m�moire (ce qui explique les 380Mo de ram bouff�e) pour avoir un aper�u des perfs m�moire.
Tableau : [1; 1x2; 1x2x3; 1x2x3x4; ... ; 1x2x3x ... x99999999]
Le controleur m�moire chez amd doit faire son petit effet.
Apres je dis �a j'en sais rien.
Int�ressant ce p'tit benchmark
. Si tu tiens une BDD ici, on peut m�me le proposer dans notre espace de t�l�chargement sur JMH et mettre le lien vers ici. Qu'en dis tu ?
Pourquoi pas?
Pour ptitpique:
/*------------------------------------------*/
/* */
/* 21/07/08 */
/* Facto bench v1.0 CPU Bench by gloups */
/* */
/*------------------------------------------*/
//librairie(s)
#include <stdio.h>
#include <windows.h>
#include <time.h>
//constante(s)
const int FACTO = 99999999;
//variable(s) globale(s)
int NB_CORE;
//prototype(s)
void facto_process (int *);
//programme principal
int main (void)
{
int i,j,A,B;
int aux;
HANDLE *tabHANDLE;
int *tabPARAM;
float duree;
printf("Factobench v1.0 bench CPU by gloups\n-------------------------------------\n\n");
//detection du nombre de core
SYSTEM_INFO SInfo;
GetSystemInfo(&SInfo);
NB_CORE=SInfo.dwNumberOfProcessors;
printf("Processeur %d core(s): ",NB_CORE);
//allocation memoire sur les 2 tabs
tabHANDLE=malloc(NB_CORE*sizeof(HANDLE));
tabPARAM=malloc(NB_CORE*2*sizeof(int));
//remplissage de tabPARAM
aux=FACTO/NB_CORE;
A=1;
B=aux;
for (i=0;i<NB_CORE*2;i=i+2)
{
tabPARAM[i]=A;
tabPARAM[i+1]=B;
A=B+1;
B=B+aux;
}
printf("lancement de %d thread(s)...\n\n",NB_CORE);
printf("Preparation pour allocation memoire de %.3fMo\n",(double)(FACTO*sizeof(int))/1048576);
//repartition de la charge de travail sur le(s) core(s)
j=0;
for (i=0;i<NB_CORE;i++)
{
tabHANDLE[i]=CreateThread(NULL,0,(LPTHREAD_START_ROUTINE) facto_process, &tabPARAM[j], 0, NULL);
j+=2;
}
//attente de fin executions des thread(s)
WaitForMultipleObjects(NB_CORE,tabHANDLE,1,INFINITE);
//liberation memoire
free(tabHANDLE);
free(tabPARAM);
//affichage duree programme
duree=clock();
duree=duree/1000;
printf("\n--------------------------\nDuree programme: %.3f s\n--------------------------\n\n",duree);
system("pause");
return 0;
}
void facto_process (int *indice)
{
int i,j,k=0;
double result;
int *MEM;
printf("\tthread %d -> allocation memoire: %.3fMo\n",indice[1]/(FACTO/NB_CORE),((double)(FACTO/NB_CORE)*sizeof(int))/1048576);
MEM=malloc((FACTO/NB_CORE)*sizeof(int));
//recuperation des parametres
i=indice[0];
result=i;
i+=1;
j=indice[1];
while (i<=j)
{
MEM[k]=(int)result;
result=result*i;
i=i+1;
k+=1;
}
MEM[k]=result;
//liberation memoire
printf("\t-thread %d -> liberation memoire: %.3fMo\n",indice[1]/(FACTO/NB_CORE),((double)(FACTO/NB_CORE)*sizeof(int))/1048576);
free(MEM);
//printf("%d!=%lf\n",FACTO,result);
}