forked from menault/2026_TD1_DEV51_Qualite_Algo
Compare commits
7 Commits
6165b37b51
...
5f9c5eec33
| Author | SHA1 | Date | |
|---|---|---|---|
| 5f9c5eec33 | |||
| b5ac7a3c89 | |||
| 1d0757868d | |||
| 6ab37d60ee | |||
| dddcfd4fd5 | |||
| 5d71287a57 | |||
| 2db740d742 |
+11
@@ -0,0 +1,11 @@
|
|||||||
|
/analyseur
|
||||||
|
/exemple
|
||||||
|
/gmon.out
|
||||||
|
/mesures/analyseur_avant
|
||||||
|
/mesures/analyseur_avant_pg
|
||||||
|
/mesures/analyseur_apres_pg
|
||||||
|
/mesures/analyseur_etape_[1-5]
|
||||||
|
/mesures/analyseur_sanitizers
|
||||||
|
/mesures/gmon_*.out
|
||||||
|
/mesures_reproduction/
|
||||||
|
/__pycache__/
|
||||||
+86
-30
@@ -14,7 +14,7 @@
|
|||||||
* L'empreinte affichée à la fin doit rester IDENTIQUE après optimisation :
|
* L'empreinte affichée à la fin doit rester IDENTIQUE après optimisation :
|
||||||
* elle prouve que le résultat du programme n'a pas changé.
|
* elle prouve que le résultat du programme n'a pas changé.
|
||||||
*
|
*
|
||||||
* Compilation : gcc -O0 -g -pg analyseur.c -o analyseur
|
* Compilation : gcc -O0 -pg analyseur.c -o analyseur
|
||||||
* Exécution : ./analyseur
|
* Exécution : ./analyseur
|
||||||
* Profil : gprof ./analyseur gmon.out > profil.txt
|
* Profil : gprof ./analyseur gmon.out > profil.txt
|
||||||
*/
|
*/
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#define NB_MOTS_TEXTE 250000
|
#define NB_MOTS_TEXTE 2500000
|
||||||
#define NB_MOTS_VOCAB 7000
|
#define NB_MOTS_VOCAB 7000
|
||||||
#define TAILLE_MOT 32
|
#define TAILLE_MOT 32
|
||||||
#define MAX_MOTS_UNIQUES 20000
|
#define MAX_MOTS_UNIQUES 20000
|
||||||
@@ -32,6 +32,7 @@
|
|||||||
/* Générateur pseudo-aléatoire (identique sur toutes les machines) */
|
/* Générateur pseudo-aléatoire (identique sur toutes les machines) */
|
||||||
/* ------------------------------------------------------------------------ */
|
/* ------------------------------------------------------------------------ */
|
||||||
|
|
||||||
|
|
||||||
static unsigned long etat_alea = GRAINE;
|
static unsigned long etat_alea = GRAINE;
|
||||||
|
|
||||||
unsigned long alea(void)
|
unsigned long alea(void)
|
||||||
@@ -209,7 +210,7 @@ char **decouper_lignes(const char *texte, int *nb_lignes)
|
|||||||
|
|
||||||
void normaliser_ligne(char *ligne)
|
void normaliser_ligne(char *ligne)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < longueur(ligne); i++) {
|
for (int i = 0; ligne[i] != '\0'; i++) {
|
||||||
if (est_lettre(ligne[i]))
|
if (est_lettre(ligne[i]))
|
||||||
ligne[i] = en_minuscule(ligne[i]);
|
ligne[i] = en_minuscule(ligne[i]);
|
||||||
else
|
else
|
||||||
@@ -224,6 +225,7 @@ void normaliser_ligne(char *ligne)
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
char mot[TAILLE_MOT];
|
char mot[TAILLE_MOT];
|
||||||
int occurrences;
|
int occurrences;
|
||||||
|
int longueur_mot;
|
||||||
} Entree;
|
} Entree;
|
||||||
|
|
||||||
int est_mot_vide(const char *mot)
|
int est_mot_vide(const char *mot)
|
||||||
@@ -235,23 +237,50 @@ int est_mot_vide(const char *mot)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int chercher_mot(Entree *table, int nb_entrees, const char *mot)
|
/* Indices + 1 : zéro représente une case libre. Charge < 31 %. */
|
||||||
|
#define CAPACITE_INDEX 65536
|
||||||
|
static int index_mots[CAPACITE_INDEX];
|
||||||
|
|
||||||
|
unsigned long hacher_mot(const char *mot)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < nb_entrees; i++) {
|
unsigned long h = 5381;
|
||||||
if (egales(table[i].mot, mot))
|
for (int i = 0; mot[i] != '\0'; i++)
|
||||||
return i;
|
h = h * 33 + (unsigned char)mot[i];
|
||||||
|
return h;
|
||||||
|
}
|
||||||
|
|
||||||
|
int chercher_mot(Entree *table, const char *mot, unsigned long *case_libre)
|
||||||
|
{
|
||||||
|
unsigned long position = hacher_mot(mot) % CAPACITE_INDEX;
|
||||||
|
while (index_mots[position] != 0) {
|
||||||
|
int indice = index_mots[position] - 1;
|
||||||
|
if (egales(table[indice].mot, mot))
|
||||||
|
return indice;
|
||||||
|
position = (position + 1) % CAPACITE_INDEX;
|
||||||
}
|
}
|
||||||
|
*case_libre = position;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void compter_mot(Entree *table, int *nb_entrees, const char *mot)
|
void compter_mot(Entree *table, int *nb_entrees, const char *mot, int longueur_mot)
|
||||||
{
|
{
|
||||||
int indice = chercher_mot(table, *nb_entrees, mot);
|
/* Réinitialisation possible pour un nouveau comptage. */
|
||||||
|
if (*nb_entrees == 0)
|
||||||
|
for (int i = 0; i < CAPACITE_INDEX; i++)
|
||||||
|
index_mots[i] = 0;
|
||||||
|
unsigned long position;
|
||||||
|
int indice = chercher_mot(table, mot, &position);
|
||||||
if (indice >= 0) {
|
if (indice >= 0) {
|
||||||
table[indice].occurrences++;
|
table[indice].occurrences++;
|
||||||
} else {
|
} else {
|
||||||
|
if (*nb_entrees == MAX_MOTS_UNIQUES) {
|
||||||
|
fputs("Trop de mots distincts\n", stderr);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
copier(table[*nb_entrees].mot, mot);
|
copier(table[*nb_entrees].mot, mot);
|
||||||
table[*nb_entrees].occurrences = 1;
|
table[*nb_entrees].occurrences = 1;
|
||||||
|
table[*nb_entrees].longueur_mot = longueur_mot;
|
||||||
|
index_mots[position] = *nb_entrees + 1;
|
||||||
(*nb_entrees)++;
|
(*nb_entrees)++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -275,7 +304,7 @@ void compter_mots_ligne(Entree *table, int *nb_entrees, const char *ligne,
|
|||||||
if (k > 0) {
|
if (k > 0) {
|
||||||
(*nb_mots_total)++;
|
(*nb_mots_total)++;
|
||||||
if (!est_mot_vide(mot))
|
if (!est_mot_vide(mot))
|
||||||
compter_mot(table, nb_entrees, mot);
|
compter_mot(table, nb_entrees, mot, k);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -291,17 +320,37 @@ int doit_echanger(const Entree *a, const Entree *b)
|
|||||||
return comparer(a->mot, b->mot) > 0;
|
return comparer(a->mot, b->mot) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Tri fusion : même ordre total, O(n log n), mémoire O(n). */
|
||||||
|
void fusionner_entrees(Entree *table, Entree *tampon, int debut, int fin)
|
||||||
|
{
|
||||||
|
if (fin - debut < 2)
|
||||||
|
return;
|
||||||
|
int milieu = debut + (fin - debut) / 2;
|
||||||
|
fusionner_entrees(table, tampon, debut, milieu);
|
||||||
|
fusionner_entrees(table, tampon, milieu, fin);
|
||||||
|
int gauche = debut, droite = milieu;
|
||||||
|
for (int k = debut; k < fin; k++) {
|
||||||
|
if (gauche < milieu && (droite == fin ||
|
||||||
|
!doit_echanger(&table[gauche], &table[droite])))
|
||||||
|
tampon[k] = table[gauche++];
|
||||||
|
else
|
||||||
|
tampon[k] = table[droite++];
|
||||||
|
}
|
||||||
|
for (int k = debut; k < fin; k++)
|
||||||
|
table[k] = tampon[k];
|
||||||
|
}
|
||||||
|
|
||||||
void trier_entrees(Entree *table, int n)
|
void trier_entrees(Entree *table, int n)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < n - 1; i++) {
|
if (n < 2)
|
||||||
for (int j = 0; j < n - 1 - i; j++) {
|
return;
|
||||||
if (doit_echanger(&table[j], &table[j + 1])) {
|
Entree *tampon = malloc((size_t)n * sizeof(*tampon));
|
||||||
Entree tmp = table[j];
|
if (tampon == NULL) {
|
||||||
table[j] = table[j + 1];
|
perror("malloc tri");
|
||||||
table[j + 1] = tmp;
|
exit(EXIT_FAILURE);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
fusionner_entrees(table, tampon, 0, n);
|
||||||
|
free(tampon);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------ */
|
/* ------------------------------------------------------------------------ */
|
||||||
@@ -312,15 +361,15 @@ double longueur_moyenne(const Entree *table, int n)
|
|||||||
{
|
{
|
||||||
long total = 0;
|
long total = 0;
|
||||||
for (int i = 0; i < n; i++)
|
for (int i = 0; i < n; i++)
|
||||||
total += longueur(table[i].mot);
|
total += table[i].longueur_mot;
|
||||||
return (double)total / n;
|
return (double)total / n;
|
||||||
}
|
}
|
||||||
|
|
||||||
double ecart_type_longueur(const Entree *table, int n)
|
double ecart_type_longueur(const Entree *table, int n, double moyenne)
|
||||||
{
|
{
|
||||||
double somme = 0.0;
|
double somme = 0.0;
|
||||||
for (int i = 0; i < n; i++) {
|
for (int i = 0; i < n; i++) {
|
||||||
double ecart = longueur(table[i].mot) - longueur_moyenne(table, n);
|
double ecart = table[i].longueur_mot - moyenne;
|
||||||
somme += ecart * ecart;
|
somme += ecart * ecart;
|
||||||
}
|
}
|
||||||
return somme / n; /* variance ; la racine est prise dans main */
|
return somme / n; /* variance ; la racine est prise dans main */
|
||||||
@@ -368,15 +417,22 @@ void analyser_bigrammes(char **lignes, int nb_lignes,
|
|||||||
|
|
||||||
char *construire_rapport(const Entree *table, int n)
|
char *construire_rapport(const Entree *table, int n)
|
||||||
{
|
{
|
||||||
char *rapport = malloc((size_t)n * 64 + 256);
|
size_t capacite = (size_t)n * 64 + 256;
|
||||||
char ligne[128];
|
char *rapport = malloc(capacite);
|
||||||
rapport[0] = '\0';
|
if (rapport == NULL) {
|
||||||
|
perror("malloc rapport");
|
||||||
ajouter(rapport, "rang;mot;occurrences\n");
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
size_t position = (size_t)snprintf(rapport, capacite, "rang;mot;occurrences\n");
|
||||||
for (int i = 0; i < n; i++) {
|
for (int i = 0; i < n; i++) {
|
||||||
snprintf(ligne, sizeof(ligne), "%d;%s;%d\n",
|
int taille = snprintf(rapport + position, capacite - position,
|
||||||
i + 1, table[i].mot, table[i].occurrences);
|
"%d;%s;%d\n", i + 1, table[i].mot, table[i].occurrences);
|
||||||
ajouter(rapport, ligne);
|
if (taille < 0 || (size_t)taille >= capacite - position) {
|
||||||
|
fputs("Rapport trop long\n", stderr);
|
||||||
|
free(rapport);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
position += (size_t)taille;
|
||||||
}
|
}
|
||||||
return rapport;
|
return rapport;
|
||||||
}
|
}
|
||||||
@@ -420,7 +476,7 @@ int main(void)
|
|||||||
trier_entrees(table, nb_entrees);
|
trier_entrees(table, nb_entrees);
|
||||||
|
|
||||||
double moyenne = longueur_moyenne(table, nb_entrees);
|
double moyenne = longueur_moyenne(table, nb_entrees);
|
||||||
double ecart_type = racine(ecart_type_longueur(table, nb_entrees));
|
double ecart_type = racine(ecart_type_longueur(table, nb_entrees, moyenne));
|
||||||
|
|
||||||
char trigramme[4];
|
char trigramme[4];
|
||||||
int occ_trigramme;
|
int occ_trigramme;
|
||||||
|
|||||||
+171
@@ -0,0 +1,171 @@
|
|||||||
|
Flat profile:
|
||||||
|
|
||||||
|
Each sample counts as 0.01 seconds.
|
||||||
|
% cumulative self self total
|
||||||
|
time seconds seconds calls ms/call ms/call name
|
||||||
|
28.85 0.23 0.23 121889737 0.00 0.00 egales
|
||||||
|
15.38 0.34 0.12 2500000 0.00 0.00 est_mot_vide
|
||||||
|
10.26 0.42 0.08 52929320 0.00 0.00 est_lettre
|
||||||
|
8.97 0.49 0.07 217318 0.00 0.00 compter_mots_ligne
|
||||||
|
7.69 0.56 0.06 1 60.00 69.97 generer_texte
|
||||||
|
5.13 0.59 0.04 1499989 0.00 0.00 hacher_mot
|
||||||
|
5.13 0.64 0.04 1 40.00 96.75 analyser_bigrammes
|
||||||
|
5.13 0.68 0.04 1 40.00 40.00 decouper_lignes
|
||||||
|
2.56 0.69 0.02 1499989 0.00 0.00 compter_mot
|
||||||
|
2.56 0.71 0.02 217318 0.00 0.00 normaliser_ligne
|
||||||
|
2.56 0.73 0.02 _init
|
||||||
|
1.92 0.75 0.01 15787 0.00 0.00 comparer
|
||||||
|
1.28 0.76 0.01 12656214 0.00 0.00 en_minuscule
|
||||||
|
1.28 0.77 0.01 9027924 0.00 0.00 alea
|
||||||
|
1.28 0.78 0.01 1499989 0.00 0.00 chercher_mot
|
||||||
|
0.00 0.78 0.00 68597 0.00 0.00 doit_echanger
|
||||||
|
0.00 0.78 0.00 27010 0.00 0.00 copier
|
||||||
|
0.00 0.78 0.00 20934 0.00 0.00 ajouter
|
||||||
|
0.00 0.78 0.00 20934 0.00 0.00 longueur
|
||||||
|
0.00 0.78 0.00 1 0.00 0.00 construire_rapport
|
||||||
|
0.00 0.78 0.00 1 0.00 0.00 ecart_type_longueur
|
||||||
|
0.00 0.78 0.00 1 0.00 0.00 empreinte
|
||||||
|
0.00 0.78 0.00 1 0.00 15.00 fusionner_entrees
|
||||||
|
0.00 0.78 0.00 1 0.00 0.03 generer_vocabulaire
|
||||||
|
0.00 0.78 0.00 1 0.00 0.00 longueur_moyenne
|
||||||
|
0.00 0.78 0.00 1 0.00 0.00 racine
|
||||||
|
0.00 0.78 0.00 1 0.00 15.00 trier_entrees
|
||||||
|
|
||||||
|
Call graph
|
||||||
|
|
||||||
|
|
||||||
|
granularity: each sample hit covers 4 byte(s) for 1.28% of 0.78 seconds
|
||||||
|
|
||||||
|
index % time self children called name
|
||||||
|
<spontaneous>
|
||||||
|
[1] 97.4 0.00 0.76 main [1]
|
||||||
|
0.07 0.41 217318/217318 compter_mots_ligne [2]
|
||||||
|
0.04 0.06 1/1 analyser_bigrammes [5]
|
||||||
|
0.06 0.01 1/1 generer_texte [8]
|
||||||
|
0.02 0.03 217318/217318 normaliser_ligne [9]
|
||||||
|
0.04 0.00 1/1 decouper_lignes [12]
|
||||||
|
0.00 0.01 1/1 trier_entrees [17]
|
||||||
|
0.00 0.00 1/1 generer_vocabulaire [20]
|
||||||
|
0.00 0.00 1/1 longueur_moyenne [27]
|
||||||
|
0.00 0.00 1/1 ecart_type_longueur [25]
|
||||||
|
0.00 0.00 1/1 racine [28]
|
||||||
|
0.00 0.00 1/1 construire_rapport [24]
|
||||||
|
0.00 0.00 1/1 empreinte [26]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.07 0.41 217318/217318 main [1]
|
||||||
|
[2] 62.2 0.07 0.41 217318 compter_mots_ligne [2]
|
||||||
|
0.12 0.22 2500000/2500000 est_mot_vide [3]
|
||||||
|
0.02 0.05 1499989/1499989 compter_mot [7]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.12 0.22 2500000/2500000 compter_mots_ligne [2]
|
||||||
|
[3] 43.9 0.12 0.22 2500000 est_mot_vide [3]
|
||||||
|
0.22 0.00 120340526/121889737 egales [4]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.00 1549211/121889737 chercher_mot [10]
|
||||||
|
0.22 0.00 120340526/121889737 est_mot_vide [3]
|
||||||
|
[4] 28.8 0.23 0.00 121889737 egales [4]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.04 0.06 1/1 main [1]
|
||||||
|
[5] 12.4 0.04 0.06 1 analyser_bigrammes [5]
|
||||||
|
0.06 0.00 37544897/52929320 est_lettre [6]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.02 0.00 15384423/52929320 normaliser_ligne [9]
|
||||||
|
0.06 0.00 37544897/52929320 analyser_bigrammes [5]
|
||||||
|
[6] 10.3 0.08 0.00 52929320 est_lettre [6]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.02 0.05 1499989/1499989 compter_mots_ligne [2]
|
||||||
|
[7] 9.3 0.02 0.05 1499989 compter_mot [7]
|
||||||
|
0.01 0.04 1499989/1499989 chercher_mot [10]
|
||||||
|
0.00 0.00 6076/27010 copier [21]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.06 0.01 1/1 main [1]
|
||||||
|
[8] 9.0 0.06 0.01 1 generer_texte [8]
|
||||||
|
0.01 0.00 8999990/9027924 alea [19]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.02 0.03 217318/217318 main [1]
|
||||||
|
[9] 6.8 0.02 0.03 217318 normaliser_ligne [9]
|
||||||
|
0.02 0.00 15384423/52929320 est_lettre [6]
|
||||||
|
0.01 0.00 12656214/12656214 en_minuscule [18]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.01 0.04 1499989/1499989 compter_mot [7]
|
||||||
|
[10] 6.8 0.01 0.04 1499989 chercher_mot [10]
|
||||||
|
0.04 0.00 1499989/1499989 hacher_mot [11]
|
||||||
|
0.00 0.00 1549211/121889737 egales [4]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.04 0.00 1499989/1499989 chercher_mot [10]
|
||||||
|
[11] 5.1 0.04 0.00 1499989 hacher_mot [11]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.04 0.00 1/1 main [1]
|
||||||
|
[12] 5.1 0.04 0.00 1 decouper_lignes [12]
|
||||||
|
-----------------------------------------------
|
||||||
|
<spontaneous>
|
||||||
|
[13] 2.6 0.02 0.00 _init [13]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.01 68597/68597 fusionner_entrees [16]
|
||||||
|
[14] 1.9 0.00 0.01 68597 doit_echanger [14]
|
||||||
|
0.01 0.00 15787/15787 comparer [15]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.01 0.00 15787/15787 doit_echanger [14]
|
||||||
|
[15] 1.9 0.01 0.00 15787 comparer [15]
|
||||||
|
-----------------------------------------------
|
||||||
|
12150 fusionner_entrees [16]
|
||||||
|
0.00 0.01 1/1 trier_entrees [17]
|
||||||
|
[16] 1.9 0.00 0.01 1+12150 fusionner_entrees [16]
|
||||||
|
0.00 0.01 68597/68597 doit_echanger [14]
|
||||||
|
12150 fusionner_entrees [16]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.01 1/1 main [1]
|
||||||
|
[17] 1.9 0.00 0.01 1 trier_entrees [17]
|
||||||
|
0.00 0.01 1/1 fusionner_entrees [16]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.01 0.00 12656214/12656214 normaliser_ligne [9]
|
||||||
|
[18] 1.3 0.01 0.00 12656214 en_minuscule [18]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.00 27934/9027924 generer_vocabulaire [20]
|
||||||
|
0.01 0.00 8999990/9027924 generer_texte [8]
|
||||||
|
[19] 1.3 0.01 0.00 9027924 alea [19]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.00 1/1 main [1]
|
||||||
|
[20] 0.0 0.00 0.00 1 generer_vocabulaire [20]
|
||||||
|
0.00 0.00 27934/9027924 alea [19]
|
||||||
|
0.00 0.00 20934/20934 ajouter [22]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.00 6076/27010 compter_mot [7]
|
||||||
|
0.00 0.00 20934/27010 ajouter [22]
|
||||||
|
[21] 0.0 0.00 0.00 27010 copier [21]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.00 20934/20934 generer_vocabulaire [20]
|
||||||
|
[22] 0.0 0.00 0.00 20934 ajouter [22]
|
||||||
|
0.00 0.00 20934/20934 longueur [23]
|
||||||
|
0.00 0.00 20934/27010 copier [21]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.00 20934/20934 ajouter [22]
|
||||||
|
[23] 0.0 0.00 0.00 20934 longueur [23]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.00 1/1 main [1]
|
||||||
|
[24] 0.0 0.00 0.00 1 construire_rapport [24]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.00 1/1 main [1]
|
||||||
|
[25] 0.0 0.00 0.00 1 ecart_type_longueur [25]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.00 1/1 main [1]
|
||||||
|
[26] 0.0 0.00 0.00 1 empreinte [26]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.00 1/1 main [1]
|
||||||
|
[27] 0.0 0.00 0.00 1 longueur_moyenne [27]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.00 1/1 main [1]
|
||||||
|
[28] 0.0 0.00 0.00 1 racine [28]
|
||||||
|
-----------------------------------------------
|
||||||
|
|
||||||
|
Index by function name
|
||||||
|
|
||||||
|
[13] _init [21] copier [16] fusionner_entrees
|
||||||
|
[22] ajouter [12] decouper_lignes [8] generer_texte
|
||||||
|
[19] alea [14] doit_echanger [20] generer_vocabulaire
|
||||||
|
[5] analyser_bigrammes [25] ecart_type_longueur [11] hacher_mot
|
||||||
|
[10] chercher_mot [4] egales [23] longueur
|
||||||
|
[15] comparer [26] empreinte [27] longueur_moyenne
|
||||||
|
[7] compter_mot [18] en_minuscule [9] normaliser_ligne
|
||||||
|
[2] compter_mots_ligne [6] est_lettre [28] racine
|
||||||
|
[24] construire_rapport [3] est_mot_vide [17] trier_entrees
|
||||||
@@ -0,0 +1,177 @@
|
|||||||
|
Flat profile:
|
||||||
|
|
||||||
|
Each sample counts as 0.01 seconds.
|
||||||
|
% cumulative self self total
|
||||||
|
time seconds seconds calls ms/call ms/call name
|
||||||
|
28.02 0.26 0.26 121889737 0.00 0.00 egales
|
||||||
|
13.74 0.38 0.12 2500000 0.00 0.00 est_mot_vide
|
||||||
|
12.09 0.49 0.11 1 110.00 145.47 analyser_bigrammes
|
||||||
|
7.69 0.56 0.07 1 70.00 70.00 decouper_lignes
|
||||||
|
6.59 0.62 0.06 1 60.00 79.94 generer_texte
|
||||||
|
6.59 0.68 0.06 _init
|
||||||
|
5.49 0.73 0.05 52929320 0.00 0.00 est_lettre
|
||||||
|
4.40 0.77 0.04 1499989 0.00 0.00 chercher_mot
|
||||||
|
4.40 0.81 0.04 217318 0.00 0.00 normaliser_ligne
|
||||||
|
2.75 0.83 0.03 15787 0.00 0.00 comparer
|
||||||
|
2.20 0.85 0.02 9027924 0.00 0.00 alea
|
||||||
|
2.20 0.88 0.02 1499989 0.00 0.00 compter_mot
|
||||||
|
1.65 0.89 0.01 1499989 0.00 0.00 hacher_mot
|
||||||
|
1.10 0.90 0.01 12656214 0.00 0.00 en_minuscule
|
||||||
|
1.10 0.91 0.01 217318 0.00 0.00 compter_mots_ligne
|
||||||
|
0.00 0.91 0.00 68597 0.00 0.00 doit_echanger
|
||||||
|
0.00 0.91 0.00 39162 0.00 0.00 longueur
|
||||||
|
0.00 0.91 0.00 27010 0.00 0.00 copier
|
||||||
|
0.00 0.91 0.00 20934 0.00 0.00 ajouter
|
||||||
|
0.00 0.91 0.00 2 0.00 0.00 longueur_moyenne
|
||||||
|
0.00 0.91 0.00 1 0.00 0.00 construire_rapport
|
||||||
|
0.00 0.91 0.00 1 0.00 0.00 ecart_type_longueur
|
||||||
|
0.00 0.91 0.00 1 0.00 0.00 empreinte
|
||||||
|
0.00 0.91 0.00 1 0.00 25.00 fusionner_entrees
|
||||||
|
0.00 0.91 0.00 1 0.00 0.06 generer_vocabulaire
|
||||||
|
0.00 0.91 0.00 1 0.00 0.00 racine
|
||||||
|
0.00 0.91 0.00 1 0.00 25.00 trier_entrees
|
||||||
|
|
||||||
|
Call graph
|
||||||
|
|
||||||
|
|
||||||
|
granularity: each sample hit covers 4 byte(s) for 1.10% of 0.91 seconds
|
||||||
|
|
||||||
|
index % time self children called name
|
||||||
|
<spontaneous>
|
||||||
|
[1] 93.4 0.00 0.85 main [1]
|
||||||
|
0.01 0.46 217318/217318 compter_mots_ligne [2]
|
||||||
|
0.11 0.04 1/1 analyser_bigrammes [5]
|
||||||
|
0.06 0.02 1/1 generer_texte [6]
|
||||||
|
0.07 0.00 1/1 decouper_lignes [8]
|
||||||
|
0.04 0.02 217318/217318 normaliser_ligne [9]
|
||||||
|
0.00 0.03 1/1 trier_entrees [16]
|
||||||
|
0.00 0.00 1/1 generer_vocabulaire [20]
|
||||||
|
0.00 0.00 1/2 longueur_moyenne [24]
|
||||||
|
0.00 0.00 1/1 ecart_type_longueur [26]
|
||||||
|
0.00 0.00 1/1 racine [28]
|
||||||
|
0.00 0.00 1/1 construire_rapport [25]
|
||||||
|
0.00 0.00 1/1 empreinte [27]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.01 0.46 217318/217318 main [1]
|
||||||
|
[2] 51.1 0.01 0.46 217318 compter_mots_ligne [2]
|
||||||
|
0.12 0.25 2500000/2500000 est_mot_vide [3]
|
||||||
|
0.02 0.06 1499989/1499989 compter_mot [7]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.12 0.25 2500000/2500000 compter_mots_ligne [2]
|
||||||
|
[3] 41.4 0.12 0.25 2500000 est_mot_vide [3]
|
||||||
|
0.25 0.00 120340526/121889737 egales [4]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.00 1549211/121889737 chercher_mot [11]
|
||||||
|
0.25 0.00 120340526/121889737 est_mot_vide [3]
|
||||||
|
[4] 28.0 0.26 0.00 121889737 egales [4]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.11 0.04 1/1 main [1]
|
||||||
|
[5] 16.0 0.11 0.04 1 analyser_bigrammes [5]
|
||||||
|
0.04 0.00 37544897/52929320 est_lettre [12]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.06 0.02 1/1 main [1]
|
||||||
|
[6] 8.8 0.06 0.02 1 generer_texte [6]
|
||||||
|
0.02 0.00 8999990/9027924 alea [17]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.02 0.06 1499989/1499989 compter_mots_ligne [2]
|
||||||
|
[7] 8.6 0.02 0.06 1499989 compter_mot [7]
|
||||||
|
0.04 0.02 1499989/1499989 chercher_mot [11]
|
||||||
|
0.00 0.00 6076/27010 copier [22]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.07 0.00 1/1 main [1]
|
||||||
|
[8] 7.7 0.07 0.00 1 decouper_lignes [8]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.04 0.02 217318/217318 main [1]
|
||||||
|
[9] 7.1 0.04 0.02 217318 normaliser_ligne [9]
|
||||||
|
0.01 0.00 15384423/52929320 est_lettre [12]
|
||||||
|
0.01 0.00 12656214/12656214 en_minuscule [19]
|
||||||
|
-----------------------------------------------
|
||||||
|
<spontaneous>
|
||||||
|
[10] 6.6 0.06 0.00 _init [10]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.04 0.02 1499989/1499989 compter_mot [7]
|
||||||
|
[11] 6.4 0.04 0.02 1499989 chercher_mot [11]
|
||||||
|
0.01 0.00 1499989/1499989 hacher_mot [18]
|
||||||
|
0.00 0.00 1549211/121889737 egales [4]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.01 0.00 15384423/52929320 normaliser_ligne [9]
|
||||||
|
0.04 0.00 37544897/52929320 analyser_bigrammes [5]
|
||||||
|
[12] 5.5 0.05 0.00 52929320 est_lettre [12]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.03 68597/68597 fusionner_entrees [15]
|
||||||
|
[13] 2.7 0.00 0.03 68597 doit_echanger [13]
|
||||||
|
0.03 0.00 15787/15787 comparer [14]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.03 0.00 15787/15787 doit_echanger [13]
|
||||||
|
[14] 2.7 0.03 0.00 15787 comparer [14]
|
||||||
|
-----------------------------------------------
|
||||||
|
12150 fusionner_entrees [15]
|
||||||
|
0.00 0.03 1/1 trier_entrees [16]
|
||||||
|
[15] 2.7 0.00 0.03 1+12150 fusionner_entrees [15]
|
||||||
|
0.00 0.03 68597/68597 doit_echanger [13]
|
||||||
|
12150 fusionner_entrees [15]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.03 1/1 main [1]
|
||||||
|
[16] 2.7 0.00 0.03 1 trier_entrees [16]
|
||||||
|
0.00 0.03 1/1 fusionner_entrees [15]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.00 27934/9027924 generer_vocabulaire [20]
|
||||||
|
0.02 0.00 8999990/9027924 generer_texte [6]
|
||||||
|
[17] 2.2 0.02 0.00 9027924 alea [17]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.01 0.00 1499989/1499989 chercher_mot [11]
|
||||||
|
[18] 1.6 0.01 0.00 1499989 hacher_mot [18]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.01 0.00 12656214/12656214 normaliser_ligne [9]
|
||||||
|
[19] 1.1 0.01 0.00 12656214 en_minuscule [19]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.00 1/1 main [1]
|
||||||
|
[20] 0.0 0.00 0.00 1 generer_vocabulaire [20]
|
||||||
|
0.00 0.00 27934/9027924 alea [17]
|
||||||
|
0.00 0.00 20934/20934 ajouter [23]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.00 6076/39162 ecart_type_longueur [26]
|
||||||
|
0.00 0.00 12152/39162 longueur_moyenne [24]
|
||||||
|
0.00 0.00 20934/39162 ajouter [23]
|
||||||
|
[21] 0.0 0.00 0.00 39162 longueur [21]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.00 6076/27010 compter_mot [7]
|
||||||
|
0.00 0.00 20934/27010 ajouter [23]
|
||||||
|
[22] 0.0 0.00 0.00 27010 copier [22]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.00 20934/20934 generer_vocabulaire [20]
|
||||||
|
[23] 0.0 0.00 0.00 20934 ajouter [23]
|
||||||
|
0.00 0.00 20934/39162 longueur [21]
|
||||||
|
0.00 0.00 20934/27010 copier [22]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.00 1/2 ecart_type_longueur [26]
|
||||||
|
0.00 0.00 1/2 main [1]
|
||||||
|
[24] 0.0 0.00 0.00 2 longueur_moyenne [24]
|
||||||
|
0.00 0.00 12152/39162 longueur [21]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.00 1/1 main [1]
|
||||||
|
[25] 0.0 0.00 0.00 1 construire_rapport [25]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.00 1/1 main [1]
|
||||||
|
[26] 0.0 0.00 0.00 1 ecart_type_longueur [26]
|
||||||
|
0.00 0.00 6076/39162 longueur [21]
|
||||||
|
0.00 0.00 1/2 longueur_moyenne [24]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.00 1/1 main [1]
|
||||||
|
[27] 0.0 0.00 0.00 1 empreinte [27]
|
||||||
|
-----------------------------------------------
|
||||||
|
0.00 0.00 1/1 main [1]
|
||||||
|
[28] 0.0 0.00 0.00 1 racine [28]
|
||||||
|
-----------------------------------------------
|
||||||
|
|
||||||
|
Index by function name
|
||||||
|
|
||||||
|
[10] _init [22] copier [15] fusionner_entrees
|
||||||
|
[23] ajouter [8] decouper_lignes [6] generer_texte
|
||||||
|
[17] alea [13] doit_echanger [20] generer_vocabulaire
|
||||||
|
[5] analyser_bigrammes [26] ecart_type_longueur [18] hacher_mot
|
||||||
|
[11] chercher_mot [4] egales [21] longueur
|
||||||
|
[14] comparer [27] empreinte [24] longueur_moyenne
|
||||||
|
[7] compter_mot [19] en_minuscule [9] normaliser_ligne
|
||||||
|
[2] compter_mots_ligne [12] est_lettre [28] racine
|
||||||
|
[25] construire_rapport [3] est_mot_vide [16] trier_entrees
|
||||||
+6077
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user