Optimise la normalisation avec une table de conversion

This commit is contained in:
rabot
2026-10-07 15:43:48 +02:00
parent 2abe610d58
commit 19ad9b7b33
5 changed files with 427 additions and 18 deletions
+18 -17
View File
@@ -85,18 +85,6 @@ void ajouter(char *dest, const char *src, size_t *position)
*position = fin;
}
char en_minuscule(char c)
{
if (c >= 'A' && c <= 'Z')
return c - 'A' + 'a';
return c;
}
int est_lettre(char c)
{
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
}
/* ------------------------------------------------------------------------ */
/* Génération du texte */
/* ------------------------------------------------------------------------ */
@@ -210,12 +198,25 @@ char **decouper_lignes(const char *texte, int *nb_lignes)
void normaliser_ligne(char *ligne)
{
for (int i = 0; ligne[i] != '\0'; i++) {
if (est_lettre(ligne[i]))
ligne[i] = en_minuscule(ligne[i]);
else
ligne[i] = ' ';
static char conversion[256];
static int initialisee = 0;
if (!initialisee) {
for (int c = 0; c < 256; c++) {
if (c >= 'A' && c <= 'Z')
conversion[c] = (char)(c - 'A' + 'a');
else if (c >= 'a' && c <= 'z')
conversion[c] = (char)c;
else
conversion[c] = ' ';
}
conversion[0] = '\0';
initialisee = 1;
}
/* L'indice non signé couvre les 256 valeurs possibles d'un octet. */
for (int i = 0; ligne[i] != '\0'; i++)
ligne[i] = conversion[(unsigned char)ligne[i]];
}
/* ------------------------------------------------------------------------ */
+90 -1
View File
@@ -600,4 +600,93 @@ Empreinte du rapport : 1d53de903efd2b7c
real 0m0.078s
user 0m0.059s
sys 0m0.001s
```
```
## Table de conversion pour `normaliser_ligne`
Une table de 256 cases mémorise le résultat de la normalisation de chaque
octet. Elle est initialisée au premier appel : les majuscules deviennent
des minuscules, les minuscules sont conservées et les autres caractères
deviennent des espaces. La boucle applique ensuite directement
`conversion[(unsigned char)ligne[i]]`, jusqu'au premier `\0`.
La conversion en `unsigned char` garantit un indice entre 0 et 255,
y compris pour les octets supérieurs à 127. Le comportement reste celui
du programme initial : seules les lettres ASCII sont conservées.
Les fonctions `est_lettre` et `en_minuscule`, devenues inutilisées, sont
supprimées. Le parcours reste en O(longueur de la ligne), avec moins de
tests et sans appel de fonction pour chaque caractère.
La table occupe 256 octets, auxquels s'ajoute l'indicateur d'initialisation
de 4 octets sur cette machine, sans allocation dynamique.
Profil enregistré dans [out/profil_apres_normalisation.txt](out/profil_apres_normalisation.txt).
La comparaison porte sur la version précédente, décrite dans
`out/profil_apres_mots_vides.txt`.
| Mesure | Avant | Après |
| --- | ---: | ---: |
| Appels à `normaliser_ligne` | 21 746 | 21 746 |
| Appels à `est_lettre` | 1 539 584 | 0 |
| Appels à `en_minuscule` | 1 266 663 | 0 |
| Temps réel médian sans profiling (`gcc -O0`, 10 exécutions par version) | 0,0577 s | 0,0508 s |
Le gain médian mesuré est de 11,9 %. Les mesures ont été réalisées en
alternant les deux versions sur la même machine :
- Avant : 0,0578 / 0,0587 / 0,0577 / 0,0574 / 0,0569 / 0,0573 / 0,0576 /
0,0572 / 0,0580 / 0,0583 s.
- Après : 0,0506 / 0,0509 / 0,0528 / 0,0511 / 0,0506 / 0,0503 / 0,0508 /
0,0512 / 0,0512 / 0,0503 s.
Validation : compilation sans avertissement avec `-Wall -Wextra -Wpedantic`,
rapport et sortie console identiques octet par octet sur les vingt
exécutions, avec `-pg` et sous AddressSanitizer et UndefinedBehaviorSanitizer.
L'empreinte reste **`1d53de903efd2b7c`**.
Des tests temporaires ont comparé la nouvelle fonction à l'ancienne sur
les 256 valeurs d'octet, une ligne vide, des caractères mélangés, des
octets après le premier zéro et une ligne de 65 536 octets. Ils vérifient
aussi qu'une seconde normalisation ne change plus le résultat, avec
`-fsigned-char` et `-funsigned-char`.
Commandes pour reproduire ce profil :
```bash
mkdir -p out/apres_normalisation
gcc -O0 -pg analyseur.c -o out/apres_normalisation/analyseur
(cd out/apres_normalisation && ./analyseur && gprof -b ./analyseur gmon.out > ../profil_apres_normalisation.txt)
```
## Vérification de la normalisation sur le même PC
Pour vérifier le gain malgré les changements de machine, les deux versions
ont été recompilées et comparées directement sur **salle235-06**, équipé
d'un **Intel Core i7-8700 à 3,20 GHz**, avec **GCC 16.2.1**.
La référence est le commit `1331811`, juste après l'optimisation de
`est_mot_vide`. La version comparée est le fichier `analyseur.c` avec la
table de conversion de `normaliser_ligne`. La différence de code porte
uniquement sur cette normalisation et la suppression des deux fonctions
utilitaires devenues inutilisées.
Protocole : mêmes options `-std=c11 -Wall -Wextra -Wpedantic -O0`, sans
`-pg`, cinq exécutions de chauffe par version, puis **50 mesures par
version**. Les versions sont exécutées successivement, en inversant
l'ordre à chaque paire, sur le même CPU logique (CPU 0). Le temps CPU
correspond à la somme des temps utilisateur et système du programme.
| Mesure médiane | Après `est_mot_vide` | Avec la nouvelle normalisation | Temps gagné |
| --- | ---: | ---: | ---: |
| Temps réel | 56,91 ms | 50,83 ms | 10,7 % |
| Temps CPU | 56,35 ms | 50,35 ms | 10,7 % |
La nouvelle version est plus rapide dans **50 paires sur 50**, en temps
réel comme en temps CPU. Le gain de la normalisation est donc confirmé
sur cette machine avec `-O0`. Il représente environ 6 ms par exécution.
Le rapport et la sortie console sont identiques sur les **110 exécutions**,
chauffe incluse. L'empreinte reste **`1d53de903efd2b7c`**.
Les [100 mesures brutes](out/comparaison_normalisation_meme_pc.csv) sont
conservées, ainsi que les [conditions et statistiques détaillées](out/comparaison_normalisation_meme_pc.json),
qui identifient le commit de référence et les deux sources utilisées.
+101
View File
@@ -0,0 +1,101 @@
paire;ordre;version;reel_s;cpu_s;utilisateur_s;systeme_s
1;1;est_mot_vide;0.056491233;0.056122000;0.056122000;0.000000000
1;2;normalisation;0.051129444;0.050743000;0.047569000;0.003174000
2;1;normalisation;0.052859973;0.052213000;0.052213000;0.000000000
2;2;est_mot_vide;0.056553175;0.056188000;0.049163000;0.007025000
3;1;est_mot_vide;0.056646180;0.056260000;0.056260000;0.000000000
3;2;normalisation;0.050820813;0.050419000;0.047057000;0.003362000
4;1;normalisation;0.050511655;0.050148000;0.050148000;0.000000000
4;2;est_mot_vide;0.057633857;0.057267000;0.057267000;0.000000000
5;1;est_mot_vide;0.058931013;0.058517000;0.058517000;0.000000000
5;2;normalisation;0.050483512;0.050130000;0.050130000;0.000000000
6;1;normalisation;0.050571728;0.050031000;0.050031000;0.000000000
6;2;est_mot_vide;0.056469042;0.055864000;0.055864000;0.000000000
7;1;est_mot_vide;0.056786315;0.056209000;0.056209000;0.000000000
7;2;normalisation;0.054489662;0.054079000;0.054079000;0.000000000
8;1;normalisation;0.053364305;0.052960000;0.052960000;0.000000000
8;2;est_mot_vide;0.059938709;0.059504000;0.056200000;0.003304000
9;1;est_mot_vide;0.056927608;0.056355000;0.053024000;0.003331000
9;2;normalisation;0.050743650;0.050397000;0.050397000;0.000000000
10;1;normalisation;0.051437591;0.051059000;0.051059000;0.000000000
10;2;est_mot_vide;0.056612828;0.056236000;0.056236000;0.000000000
11;1;est_mot_vide;0.056272508;0.055704000;0.055704000;0.000000000
11;2;normalisation;0.050365767;0.050021000;0.046684000;0.003337000
12;1;normalisation;0.050671909;0.050125000;0.050125000;0.000000000
12;2;est_mot_vide;0.056635849;0.056280000;0.056280000;0.000000000
13;1;est_mot_vide;0.056769250;0.056186000;0.056186000;0.000000000
13;2;normalisation;0.050474641;0.050140000;0.050140000;0.000000000
14;1;normalisation;0.051163379;0.050578000;0.050578000;0.000000000
14;2;est_mot_vide;0.056933057;0.056577000;0.053247000;0.003330000
15;1;est_mot_vide;0.057398894;0.056795000;0.056795000;0.000000000
15;2;normalisation;0.050772062;0.050235000;0.050235000;0.000000000
16;1;normalisation;0.050913189;0.050575000;0.050575000;0.000000000
16;2;est_mot_vide;0.056655224;0.056318000;0.056318000;0.000000000
17;1;est_mot_vide;0.056525765;0.056190000;0.056190000;0.000000000
17;2;normalisation;0.050352528;0.050011000;0.050011000;0.000000000
18;1;normalisation;0.050842096;0.050096000;0.043787000;0.006309000
18;2;est_mot_vide;0.057116281;0.056570000;0.053229000;0.003341000
19;1;est_mot_vide;0.057103442;0.056740000;0.056740000;0.000000000
19;2;normalisation;0.050779039;0.050208000;0.046845000;0.003363000
20;1;normalisation;0.050054952;0.049702000;0.049702000;0.000000000
20;2;est_mot_vide;0.058944302;0.058092000;0.058092000;0.000000000
21;1;est_mot_vide;0.056722629;0.056347000;0.056347000;0.000000000
21;2;normalisation;0.050731609;0.050375000;0.047014000;0.003361000
22;1;normalisation;0.050819285;0.050259000;0.047104000;0.003155000
22;2;est_mot_vide;0.056630778;0.056063000;0.056063000;0.000000000
23;1;est_mot_vide;0.057257033;0.056642000;0.056642000;0.000000000
23;2;normalisation;0.051949088;0.051599000;0.048158000;0.003441000
24;1;normalisation;0.051005800;0.050636000;0.044301000;0.006335000
24;2;est_mot_vide;0.057043455;0.056271000;0.056271000;0.000000000
25;1;est_mot_vide;0.057602567;0.056820000;0.056820000;0.000000000
25;2;normalisation;0.050556449;0.050000000;0.050000000;0.000000000
26;1;normalisation;0.050617535;0.050016000;0.046668000;0.003348000
26;2;est_mot_vide;0.056347331;0.055776000;0.055776000;0.000000000
27;1;est_mot_vide;0.056876707;0.056082000;0.052755000;0.003327000
27;2;normalisation;0.050732818;0.049943000;0.046588000;0.003355000
28;1;normalisation;0.050696128;0.050356000;0.050356000;0.000000000
28;2;est_mot_vide;0.057392773;0.056837000;0.056837000;0.000000000
29;1;est_mot_vide;0.057540365;0.056687000;0.050339000;0.006348000
29;2;normalisation;0.050629883;0.050266000;0.050266000;0.000000000
30;1;normalisation;0.050633852;0.050301000;0.046944000;0.003357000
30;2;est_mot_vide;0.057387534;0.056604000;0.053263000;0.003341000
31;1;est_mot_vide;0.056705212;0.056221000;0.056221000;0.000000000
31;2;normalisation;0.051605342;0.050607000;0.050607000;0.000000000
32;1;normalisation;0.050774977;0.050195000;0.046832000;0.003363000
32;2;est_mot_vide;0.057347698;0.056481000;0.056481000;0.000000000
33;1;est_mot_vide;0.057314656;0.056493000;0.053142000;0.003351000
33;2;normalisation;0.051035417;0.050702000;0.047319000;0.003383000
34;1;normalisation;0.051096606;0.050325000;0.050325000;0.000000000
34;2;est_mot_vide;0.056984515;0.056397000;0.053065000;0.003332000
35;1;est_mot_vide;0.056948057;0.056378000;0.049735000;0.006643000
35;2;normalisation;0.050945416;0.050349000;0.047188000;0.003161000
36;1;normalisation;0.050665690;0.050325000;0.050325000;0.000000000
36;2;est_mot_vide;0.056564751;0.056024000;0.056024000;0.000000000
37;1;est_mot_vide;0.056814287;0.056267000;0.056267000;0.000000000
37;2;normalisation;0.050693901;0.050345000;0.050345000;0.000000000
38;1;normalisation;0.051073204;0.050687000;0.047516000;0.003171000
38;2;est_mot_vide;0.056708081;0.056123000;0.052807000;0.003316000
39;1;est_mot_vide;0.058150167;0.057529000;0.054130000;0.003399000
39;2;normalisation;0.051624538;0.051171000;0.047760000;0.003411000
40;1;normalisation;0.050851577;0.050450000;0.047083000;0.003367000
40;2;est_mot_vide;0.056863893;0.056294000;0.056294000;0.000000000
41;1;est_mot_vide;0.056938046;0.056313000;0.049663000;0.006650000
41;2;normalisation;0.051268160;0.050718000;0.050718000;0.000000000
42;1;normalisation;0.050889004;0.050469000;0.050469000;0.000000000
42;2;est_mot_vide;0.056899960;0.056519000;0.056519000;0.000000000
43;1;est_mot_vide;0.056661776;0.056094000;0.056094000;0.000000000
43;2;normalisation;0.051071801;0.050505000;0.050505000;0.000000000
44;1;normalisation;0.051212294;0.050659000;0.050659000;0.000000000
44;2;est_mot_vide;0.056953281;0.056597000;0.053266000;0.003331000
45;1;est_mot_vide;0.057247562;0.056689000;0.056689000;0.000000000
45;2;normalisation;0.051919210;0.051286000;0.047848000;0.003438000
46;1;normalisation;0.053911622;0.053561000;0.050211000;0.003350000
46;2;est_mot_vide;0.057280343;0.056880000;0.056880000;0.000000000
47;1;est_mot_vide;0.057210951;0.056736000;0.050053000;0.006683000
47;2;normalisation;0.050836595;0.050275000;0.050275000;0.000000000
48;1;normalisation;0.050400129;0.050021000;0.046687000;0.003334000
48;2;est_mot_vide;0.056861357;0.056310000;0.056310000;0.000000000
49;1;est_mot_vide;0.056884618;0.056497000;0.053181000;0.003316000
49;2;normalisation;0.050721396;0.050345000;0.046993000;0.003352000
50;1;normalisation;0.050842075;0.050114000;0.050114000;0.000000000
50;2;est_mot_vide;0.056320156;0.055765000;0.055765000;0.000000000
1 paire ordre version reel_s cpu_s utilisateur_s systeme_s
2 1 1 est_mot_vide 0.056491233 0.056122000 0.056122000 0.000000000
3 1 2 normalisation 0.051129444 0.050743000 0.047569000 0.003174000
4 2 1 normalisation 0.052859973 0.052213000 0.052213000 0.000000000
5 2 2 est_mot_vide 0.056553175 0.056188000 0.049163000 0.007025000
6 3 1 est_mot_vide 0.056646180 0.056260000 0.056260000 0.000000000
7 3 2 normalisation 0.050820813 0.050419000 0.047057000 0.003362000
8 4 1 normalisation 0.050511655 0.050148000 0.050148000 0.000000000
9 4 2 est_mot_vide 0.057633857 0.057267000 0.057267000 0.000000000
10 5 1 est_mot_vide 0.058931013 0.058517000 0.058517000 0.000000000
11 5 2 normalisation 0.050483512 0.050130000 0.050130000 0.000000000
12 6 1 normalisation 0.050571728 0.050031000 0.050031000 0.000000000
13 6 2 est_mot_vide 0.056469042 0.055864000 0.055864000 0.000000000
14 7 1 est_mot_vide 0.056786315 0.056209000 0.056209000 0.000000000
15 7 2 normalisation 0.054489662 0.054079000 0.054079000 0.000000000
16 8 1 normalisation 0.053364305 0.052960000 0.052960000 0.000000000
17 8 2 est_mot_vide 0.059938709 0.059504000 0.056200000 0.003304000
18 9 1 est_mot_vide 0.056927608 0.056355000 0.053024000 0.003331000
19 9 2 normalisation 0.050743650 0.050397000 0.050397000 0.000000000
20 10 1 normalisation 0.051437591 0.051059000 0.051059000 0.000000000
21 10 2 est_mot_vide 0.056612828 0.056236000 0.056236000 0.000000000
22 11 1 est_mot_vide 0.056272508 0.055704000 0.055704000 0.000000000
23 11 2 normalisation 0.050365767 0.050021000 0.046684000 0.003337000
24 12 1 normalisation 0.050671909 0.050125000 0.050125000 0.000000000
25 12 2 est_mot_vide 0.056635849 0.056280000 0.056280000 0.000000000
26 13 1 est_mot_vide 0.056769250 0.056186000 0.056186000 0.000000000
27 13 2 normalisation 0.050474641 0.050140000 0.050140000 0.000000000
28 14 1 normalisation 0.051163379 0.050578000 0.050578000 0.000000000
29 14 2 est_mot_vide 0.056933057 0.056577000 0.053247000 0.003330000
30 15 1 est_mot_vide 0.057398894 0.056795000 0.056795000 0.000000000
31 15 2 normalisation 0.050772062 0.050235000 0.050235000 0.000000000
32 16 1 normalisation 0.050913189 0.050575000 0.050575000 0.000000000
33 16 2 est_mot_vide 0.056655224 0.056318000 0.056318000 0.000000000
34 17 1 est_mot_vide 0.056525765 0.056190000 0.056190000 0.000000000
35 17 2 normalisation 0.050352528 0.050011000 0.050011000 0.000000000
36 18 1 normalisation 0.050842096 0.050096000 0.043787000 0.006309000
37 18 2 est_mot_vide 0.057116281 0.056570000 0.053229000 0.003341000
38 19 1 est_mot_vide 0.057103442 0.056740000 0.056740000 0.000000000
39 19 2 normalisation 0.050779039 0.050208000 0.046845000 0.003363000
40 20 1 normalisation 0.050054952 0.049702000 0.049702000 0.000000000
41 20 2 est_mot_vide 0.058944302 0.058092000 0.058092000 0.000000000
42 21 1 est_mot_vide 0.056722629 0.056347000 0.056347000 0.000000000
43 21 2 normalisation 0.050731609 0.050375000 0.047014000 0.003361000
44 22 1 normalisation 0.050819285 0.050259000 0.047104000 0.003155000
45 22 2 est_mot_vide 0.056630778 0.056063000 0.056063000 0.000000000
46 23 1 est_mot_vide 0.057257033 0.056642000 0.056642000 0.000000000
47 23 2 normalisation 0.051949088 0.051599000 0.048158000 0.003441000
48 24 1 normalisation 0.051005800 0.050636000 0.044301000 0.006335000
49 24 2 est_mot_vide 0.057043455 0.056271000 0.056271000 0.000000000
50 25 1 est_mot_vide 0.057602567 0.056820000 0.056820000 0.000000000
51 25 2 normalisation 0.050556449 0.050000000 0.050000000 0.000000000
52 26 1 normalisation 0.050617535 0.050016000 0.046668000 0.003348000
53 26 2 est_mot_vide 0.056347331 0.055776000 0.055776000 0.000000000
54 27 1 est_mot_vide 0.056876707 0.056082000 0.052755000 0.003327000
55 27 2 normalisation 0.050732818 0.049943000 0.046588000 0.003355000
56 28 1 normalisation 0.050696128 0.050356000 0.050356000 0.000000000
57 28 2 est_mot_vide 0.057392773 0.056837000 0.056837000 0.000000000
58 29 1 est_mot_vide 0.057540365 0.056687000 0.050339000 0.006348000
59 29 2 normalisation 0.050629883 0.050266000 0.050266000 0.000000000
60 30 1 normalisation 0.050633852 0.050301000 0.046944000 0.003357000
61 30 2 est_mot_vide 0.057387534 0.056604000 0.053263000 0.003341000
62 31 1 est_mot_vide 0.056705212 0.056221000 0.056221000 0.000000000
63 31 2 normalisation 0.051605342 0.050607000 0.050607000 0.000000000
64 32 1 normalisation 0.050774977 0.050195000 0.046832000 0.003363000
65 32 2 est_mot_vide 0.057347698 0.056481000 0.056481000 0.000000000
66 33 1 est_mot_vide 0.057314656 0.056493000 0.053142000 0.003351000
67 33 2 normalisation 0.051035417 0.050702000 0.047319000 0.003383000
68 34 1 normalisation 0.051096606 0.050325000 0.050325000 0.000000000
69 34 2 est_mot_vide 0.056984515 0.056397000 0.053065000 0.003332000
70 35 1 est_mot_vide 0.056948057 0.056378000 0.049735000 0.006643000
71 35 2 normalisation 0.050945416 0.050349000 0.047188000 0.003161000
72 36 1 normalisation 0.050665690 0.050325000 0.050325000 0.000000000
73 36 2 est_mot_vide 0.056564751 0.056024000 0.056024000 0.000000000
74 37 1 est_mot_vide 0.056814287 0.056267000 0.056267000 0.000000000
75 37 2 normalisation 0.050693901 0.050345000 0.050345000 0.000000000
76 38 1 normalisation 0.051073204 0.050687000 0.047516000 0.003171000
77 38 2 est_mot_vide 0.056708081 0.056123000 0.052807000 0.003316000
78 39 1 est_mot_vide 0.058150167 0.057529000 0.054130000 0.003399000
79 39 2 normalisation 0.051624538 0.051171000 0.047760000 0.003411000
80 40 1 normalisation 0.050851577 0.050450000 0.047083000 0.003367000
81 40 2 est_mot_vide 0.056863893 0.056294000 0.056294000 0.000000000
82 41 1 est_mot_vide 0.056938046 0.056313000 0.049663000 0.006650000
83 41 2 normalisation 0.051268160 0.050718000 0.050718000 0.000000000
84 42 1 normalisation 0.050889004 0.050469000 0.050469000 0.000000000
85 42 2 est_mot_vide 0.056899960 0.056519000 0.056519000 0.000000000
86 43 1 est_mot_vide 0.056661776 0.056094000 0.056094000 0.000000000
87 43 2 normalisation 0.051071801 0.050505000 0.050505000 0.000000000
88 44 1 normalisation 0.051212294 0.050659000 0.050659000 0.000000000
89 44 2 est_mot_vide 0.056953281 0.056597000 0.053266000 0.003331000
90 45 1 est_mot_vide 0.057247562 0.056689000 0.056689000 0.000000000
91 45 2 normalisation 0.051919210 0.051286000 0.047848000 0.003438000
92 46 1 normalisation 0.053911622 0.053561000 0.050211000 0.003350000
93 46 2 est_mot_vide 0.057280343 0.056880000 0.056880000 0.000000000
94 47 1 est_mot_vide 0.057210951 0.056736000 0.050053000 0.006683000
95 47 2 normalisation 0.050836595 0.050275000 0.050275000 0.000000000
96 48 1 normalisation 0.050400129 0.050021000 0.046687000 0.003334000
97 48 2 est_mot_vide 0.056861357 0.056310000 0.056310000 0.000000000
98 49 1 est_mot_vide 0.056884618 0.056497000 0.053181000 0.003316000
99 49 2 normalisation 0.050721396 0.050345000 0.046993000 0.003352000
100 50 1 normalisation 0.050842075 0.050114000 0.050114000 0.000000000
101 50 2 est_mot_vide 0.056320156 0.055765000 0.055765000 0.000000000
@@ -0,0 +1,60 @@
{
"machine": "salle235-06",
"processeur": "Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz",
"cpu_logique": 0,
"compilateur": "gcc (GCC) 16.2.1 20260810",
"options": [
"-std=c11",
"-Wall",
"-Wextra",
"-Wpedantic",
"-O0"
],
"profiling": false,
"reference_commit": "13318119ae97c3b2a76b99fdf85ce82d908865de",
"source_sha256": {
"est_mot_vide": "2bff822183b0e61b31c25b7ea6e6453bb20a69474a73558eb2b9113b9f1d92aa",
"normalisation": "6239cabc4e98a3e841be7e446d2690a24a51aab6719528ea7c0ee3da10562320"
},
"chauffe_par_version": 5,
"mesures_par_version": 50,
"empreinte_rapport": "1d53de903efd2b7c",
"est_mot_vide": {
"reel_s": {
"mediane": 0.056913783999999995,
"q1": 0.056656861999999995,
"q3": 0.0572745155,
"min": 0.056272508,
"max": 0.059938709
},
"cpu_s": {
"mediane": 0.056351000000000054,
"q1": 0.05619474999999996,
"q3": 0.05667575000000001,
"min": 0.055703999999999976,
"max": 0.05950400000000003
}
},
"normalisation": {
"reel_s": {
"mediane": 0.050828704,
"q1": 0.05066724475000001,
"q3": 0.0511212345,
"min": 0.050054952,
"max": 0.054489662
},
"cpu_s": {
"mediane": 0.050346999999999476,
"q1": 0.05014199999999988,
"q3": 0.05065324999999965,
"min": 0.04970199999999991,
"max": 0.05407899999999999
}
},
"gain_reel_pourcent": 10.691750877081008,
"gain_cpu_pourcent": 10.654646767582776,
"paires_plus_rapides": {
"reel_s": 50,
"cpu_s": 50
}
}
+158
View File
@@ -0,0 +1,158 @@
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ns/call ns/call name
66.67 0.02 0.02 250000 80.00 80.00 est_mot_vide
33.33 0.03 0.01 21746 459.85 459.85 normaliser_ligne
0.00 0.03 0.00 928117 0.00 0.00 alea
0.00 0.03 0.00 355573 0.00 0.00 egales
0.00 0.03 0.00 293223 0.00 0.00 hacher_mot
0.00 0.03 0.00 150182 0.00 0.00 chercher_mot
0.00 0.03 0.00 150182 0.00 0.00 compter_mot
0.00 0.03 0.00 129602 0.00 0.00 doit_echanger
0.00 0.03 0.00 32813 0.00 0.00 comparer
0.00 0.03 0.00 26801 0.00 0.00 ajouter
0.00 0.03 0.00 21746 0.00 919.71 compter_mots_ligne
0.00 0.03 0.00 8798 0.00 0.00 retablir_tas
0.00 0.03 0.00 5866 0.00 0.00 copier
0.00 0.03 0.00 1 0.00 0.00 analyser_bigrammes
0.00 0.03 0.00 1 0.00 0.00 construire_rapport
0.00 0.03 0.00 1 0.00 0.00 decouper_lignes
0.00 0.03 0.00 1 0.00 0.00 ecart_type_longueur
0.00 0.03 0.00 1 0.00 0.00 empreinte
0.00 0.03 0.00 1 0.00 0.00 generer_texte
0.00 0.03 0.00 1 0.00 0.00 generer_vocabulaire
0.00 0.03 0.00 1 0.00 0.00 initialiser_mots_vides
0.00 0.03 0.00 1 0.00 0.00 longueur_moyenne
0.00 0.03 0.00 1 0.00 0.00 racine
0.00 0.03 0.00 1 0.00 0.00 trier_entrees
Call graph
granularity: each sample hit covers 4 byte(s) for 33.33% of 0.03 seconds
index % time self children called name
<spontaneous>
[1] 100.0 0.00 0.03 main [1]
0.00 0.02 21746/21746 compter_mots_ligne [3]
0.01 0.00 21746/21746 normaliser_ligne [4]
0.00 0.00 1/1 generer_vocabulaire [21]
0.00 0.00 1/1 generer_texte [20]
0.00 0.00 1/1 decouper_lignes [17]
0.00 0.00 1/1 trier_entrees [25]
0.00 0.00 1/1 longueur_moyenne [23]
0.00 0.00 1/1 ecart_type_longueur [18]
0.00 0.00 1/1 racine [24]
0.00 0.00 1/1 analyser_bigrammes [15]
0.00 0.00 1/1 construire_rapport [16]
0.00 0.00 1/1 empreinte [19]
-----------------------------------------------
0.02 0.00 250000/250000 compter_mots_ligne [3]
[2] 66.7 0.02 0.00 250000 est_mot_vide [2]
0.00 0.00 202444/355573 egales [6]
0.00 0.00 142981/293223 hacher_mot [7]
0.00 0.00 1/1 initialiser_mots_vides [22]
-----------------------------------------------
0.00 0.02 21746/21746 main [1]
[3] 66.7 0.00 0.02 21746 compter_mots_ligne [3]
0.02 0.00 250000/250000 est_mot_vide [2]
0.00 0.00 150182/150182 compter_mot [9]
-----------------------------------------------
0.01 0.00 21746/21746 main [1]
[4] 33.3 0.01 0.00 21746 normaliser_ligne [4]
-----------------------------------------------
0.00 0.00 27934/928117 generer_vocabulaire [21]
0.00 0.00 900183/928117 generer_texte [20]
[5] 0.0 0.00 0.00 928117 alea [5]
-----------------------------------------------
0.00 0.00 28/355573 initialiser_mots_vides [22]
0.00 0.00 153101/355573 chercher_mot [8]
0.00 0.00 202444/355573 est_mot_vide [2]
[6] 0.0 0.00 0.00 355573 egales [6]
-----------------------------------------------
0.00 0.00 60/293223 initialiser_mots_vides [22]
0.00 0.00 142981/293223 est_mot_vide [2]
0.00 0.00 150182/293223 chercher_mot [8]
[7] 0.0 0.00 0.00 293223 hacher_mot [7]
-----------------------------------------------
0.00 0.00 150182/150182 compter_mot [9]
[8] 0.0 0.00 0.00 150182 chercher_mot [8]
0.00 0.00 153101/355573 egales [6]
0.00 0.00 150182/293223 hacher_mot [7]
-----------------------------------------------
0.00 0.00 150182/150182 compter_mots_ligne [3]
[9] 0.0 0.00 0.00 150182 compter_mot [9]
0.00 0.00 150182/150182 chercher_mot [8]
0.00 0.00 5866/5866 copier [14]
-----------------------------------------------
0.00 0.00 129602/129602 retablir_tas [13]
[10] 0.0 0.00 0.00 129602 doit_echanger [10]
0.00 0.00 32813/32813 comparer [11]
-----------------------------------------------
0.00 0.00 32813/32813 doit_echanger [10]
[11] 0.0 0.00 0.00 32813 comparer [11]
-----------------------------------------------
0.00 0.00 5867/26801 construire_rapport [16]
0.00 0.00 20934/26801 generer_vocabulaire [21]
[12] 0.0 0.00 0.00 26801 ajouter [12]
-----------------------------------------------
0.00 0.00 8798/8798 trier_entrees [25]
[13] 0.0 0.00 0.00 8798 retablir_tas [13]
0.00 0.00 129602/129602 doit_echanger [10]
-----------------------------------------------
0.00 0.00 5866/5866 compter_mot [9]
[14] 0.0 0.00 0.00 5866 copier [14]
-----------------------------------------------
0.00 0.00 1/1 main [1]
[15] 0.0 0.00 0.00 1 analyser_bigrammes [15]
-----------------------------------------------
0.00 0.00 1/1 main [1]
[16] 0.0 0.00 0.00 1 construire_rapport [16]
0.00 0.00 5867/26801 ajouter [12]
-----------------------------------------------
0.00 0.00 1/1 main [1]
[17] 0.0 0.00 0.00 1 decouper_lignes [17]
-----------------------------------------------
0.00 0.00 1/1 main [1]
[18] 0.0 0.00 0.00 1 ecart_type_longueur [18]
-----------------------------------------------
0.00 0.00 1/1 main [1]
[19] 0.0 0.00 0.00 1 empreinte [19]
-----------------------------------------------
0.00 0.00 1/1 main [1]
[20] 0.0 0.00 0.00 1 generer_texte [20]
0.00 0.00 900183/928117 alea [5]
-----------------------------------------------
0.00 0.00 1/1 main [1]
[21] 0.0 0.00 0.00 1 generer_vocabulaire [21]
0.00 0.00 27934/928117 alea [5]
0.00 0.00 20934/26801 ajouter [12]
-----------------------------------------------
0.00 0.00 1/1 est_mot_vide [2]
[22] 0.0 0.00 0.00 1 initialiser_mots_vides [22]
0.00 0.00 60/293223 hacher_mot [7]
0.00 0.00 28/355573 egales [6]
-----------------------------------------------
0.00 0.00 1/1 main [1]
[23] 0.0 0.00 0.00 1 longueur_moyenne [23]
-----------------------------------------------
0.00 0.00 1/1 main [1]
[24] 0.0 0.00 0.00 1 racine [24]
-----------------------------------------------
0.00 0.00 1/1 main [1]
[25] 0.0 0.00 0.00 1 trier_entrees [25]
0.00 0.00 8798/8798 retablir_tas [13]
-----------------------------------------------
Index by function name
[12] ajouter [14] copier [21] generer_vocabulaire
[5] alea [17] decouper_lignes [7] hacher_mot
[15] analyser_bigrammes [10] doit_echanger [22] initialiser_mots_vides
[8] chercher_mot [18] ecart_type_longueur [23] longueur_moyenne
[11] comparer [6] egales [4] normaliser_ligne
[9] compter_mot [19] empreinte [24] racine
[3] compter_mots_ligne [2] est_mot_vide [13] retablir_tas
[16] construire_rapport [20] generer_texte [25] trier_entrees