Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Commits on Source (80)
Showing
with 2044 additions and 29 deletions
## Etendue de l'étude
- Nombre de tris
- [x] Insertion, Fusion, Rapide et au moins un autre tri sont traités.
- [ ] Insertion, Fusion et Rapide sont traités.
- [ ] Insertion, Fusion et Rapide ne sont pas tous traités.
- Type de jeu de test
- [ ] Aléatoire, Trié, Tri inversé et au moins un autre jeu sont traités.
- [x] Aléatoire, Trié et Tri inversé sont traités.
- [ ] Aléatoire, Trié et Tri inversé ne sont pas tous traités.
## Rédaction et analyses
- Description du problème
- [x] La section est pertinente, succincte et précise.
- [ ] La section est pertinente.
- [ ] La section n'est pas pertinente.
- Application
- [x] La section est pertinente, succincte et précise.
- [ ] La section est pertinente.
- [ ] La section n'est pas pertinente.
- Environnement de test
- [x] La section est pertinente, succincte et précise.
- [ ] La section est pertinente.
- [ ] La section n'est pas pertinente.
- Description de la démarche systématique
- [ ] La section est pertinente, succincte et précise.
- [x] La section est pertinente.
- [ ] La section n'est pas pertinente.
- Analyse des résultats préalables
- [x] La section est pertinente, succincte et précise.
- [ ] La section est pertinente.
- [ ] La section n'est pas pertinente.
- Discussion des résultats préalables
- [ ] La section est pertinente, succincte et précise.
- [x] La section est pertinente.
- [ ] La section n'est pas pertinente.
- Hypothèse
- [ ] La section est pertinente, succincte et précise.
- [x] La section est pertinente.
- [ ] La section n'est pas pertinente.
- Protocole expérimental de vérification de l'hypothèse
- [x] La section est pertinente, succincte et précise.
- [ ] La section est pertinente.
- [ ] La section n'est pas pertinente.
- Analyse des résultats expérimentaux
- [ ] La section est pertinente, succincte et précise.
- [ ] La section est pertinente.
- [x] La section n'est pas pertinente.
- Discussion des résultats expérimentaux
- [ ] La section est pertinente, succincte et précise.
- [ ] La section est pertinente.
- [x] La section n'est pas pertinente.
- Conclusion et travaux futurs
- [ ] La section est pertinente, succincte et précise.
- [ ] La section est pertinente.
- [x] La section n'est pas pertinente.
## Résultats
- Nombre
- [x] Les tests sont suffisament nombreux pour observer des épiphénomènes
- [ ] Les tests sont suffisament nombreux pour observer des phénomènes
- [ ] Les tests ne sont pas suffisament nombreux pour observer des phénomènes
- Echantillon
- [x] L'échantillon choisi a un bon équilbre entre temps d'exécution et observations
- [ ] L'échantillon choisi néglige les temps d'exécution
- [ ] L'échantillon choisi néglige les observations
- Artefacts
- [ ] Les observations excluent tout artefacts
- [x] Certains artefacts, comme des pas d'horloge, sont visibles
- [ ] Seuls des artefacts sont observables
- Décoration
- [x] Les plots contiennent légende et titre
- [ ] Les plots contiennent légende ou titre
- [ ] Les plots ne contiennent ni légende ni titre
- Lisibilité
- [x] Les plots permettent de lire clairement toutes les séries
- [ ] Les plots permettent de lire clairement la plupart des séries
- [ ] Les plots permettent pas de lire clairement la plupart des séries
- Echelles
- [x] Les échelles sont respectées pour permettre la visualisation et la comparaison des séries entre plots
- [ ] Les échelles sont respectées pour permettre la visualisation des séries entre plots
- [ ] Les échelles ne sont pas respectées pour permettre la visualisation des séries entre plots
## Hypothèse
- Originalité
- [ ] L'hypothèse émise est orginale et trouvée intégralement par l'étudiant.
- [x] L'hypthèse émise est orginale.
- [ ] L'hypthèse émise n'est pas originale.
- Difficulté
- [ ] L'hypothèse émise est très difficile à prouver.
- [x] L'hypothèse émise est difficile à prouver.
- [ ] L'hypothèse émise est facile à prouver.
- Théorie
- [ ] L'analyse de l'hypothèse se confronte à la théorie avec pertinence.
- [ ] L'analyse de l'hypothèse se confronte à la théorie.
- [x] L'analyse de l'hypothèse ne se confronte pas à la théorie.
# Résultat
- Total d'item « Excellent » (1 point) : 11
- Total d'item « Satisfaisant » (0,5 point: 7
- Total d'item « Insatisfaisant » (0 point) : 4
- Note sur 22 : 14,5
# P4z : Analyse de performances de différents tris
[Grille d'évaluation P4z](https://docs.google.com/spreadsheets/d/1VXeO91rhy04xa0p8KUhWliFl228utHaDir8MstO5Z-M/edit?usp=sharing
)
[Grille d'évaluation P4z](https://docs.google.com/spreadsheets/d/1VXeO91rhy04xa0p8KUhWliFl228utHaDir8MstO5Z-M/edit?usp=sharing)
## Problème
Description du Problème.
Notre problème ? Comment trier efficacement des tableaux !
Description de tous les paramètres exploratoires du problème
Et par efficacement trier des tableaux, nous entendons les trier le plus rapidement possible, en consommant le moins de mémoire possible. Pour ceci nous allons partir de 4 algorithmes de tri différents et étudier leur temps d'exécution et leur consommation de mémoire en fonction du tableau à trier (tableau généré aléatoirement, déjà trié, trié dans le sens inverse, trié à moitié).
## Dispositif expérimental
### Application
[code source de l'application](chemin)
```
Description de l'application et des arguments
```
[code source de l'application](src/)
Pour utiliser les tris, vous avez besoin de 2 choses:<br>
- Le binaire `tri`<br>
- Un document texte contenant les éléments du tableau, chaque élément est séparé du prochain par un espace et pour finit par un `.`. <br>
Ex : `4 3 11 29 .`<br>
Le binaire demande une option et un fichier, le fichier est du type de ceux définit plus haut, quant aux option il en existe plusieures : <br>
- `-i` ou `--insertion` pour le tri à insertion
- `-f` ou `--fusion` pour le tri à fusion
- `-r` ou `--rapide` pour le tri rapide
- `-b` ou `--bulle` pour le tri à bulle
- `-ri` ou `--rapideInsertion` pour le tri rapide mélangé avec le tri insertion (développé dans l'hypothèse)
- `-a` ou `--all` pour tout les tris disponibles
- `-iv` ou `--insertion-verbose` pour le tri à insertion avec les affichages avancés
- `-fv` ou `--fusion-verbose` pour le tri à fusion avec les affichages avancés
- `-rv` ou `--rapide-verbose` pour le tri rapide avec les affichages avancés
- `-g` qui génére un nouveau tableau sur stdout avec une taille du tableau et un nombre max
- `-gt` qui génére un nouveau tableau trié sur stdout avec une taille du tableau et un nombre max
- `-gti` qui génére un nouveau tableau trié dans le sens inverse sur stdout avec une taille du tableau et un nombre max
- `-gtp` qui génére un nouveau tableau trié à moitié sur stdout avec une taille du tableau et un nombre max
### Environnement de test
Description de la plateforme de test
Les tests se sont fait sur troglo en connexion à distance, le fichier obtenu avec cat /proc/cpuinfo est disponible ici : [cpuinfo](src/Scripts/cpuinfo.txt).
D'autres test (principalement pour les hypothèses) ont été effectués sur l'ordinateur personnel d'Antonin, (ce qui a déjà entrainé quelques soucis), le cpuinfo de l'ordinateur est disponible ici : [cpuinfo_antonin](src/Scripts/cpuinfo_antonin.txt).
Les infos "importantes" :
- Sur Troglo
```
model name : Intel(R) Xeon(R) CPU E5-2630L v3 @ 1.80GHz
cpu MHz : 1198.728
cache size : 20480 KB
```
Extrait pertinent de /proc/cpuinfo
- Sur l'ordinateur d'Antonin
```
model name : Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
stepping : 10
microcode : 0xca
cpu MHz : 1407.683
cache size : 12288 KB
```
### Description de la démarche systématique
Description de la démarche systématique et de l'espace d'exploration pour chaque paramètres.
On va tester le tri à bulle, le tri par insertion, le tri fusion et le tri rapide avec des tableaux générés aléatoirement de taille entre 0 et 100 000 et ayant des valeurs entre 0 et 100 000 pour observer leurs temps d'exécution et leur consommation mémoire.
Pour obtenir perf.dat contenant toutes les données (à exécuter dans [src/Scripts/](src/Scripts/)):
```
sh perf.sh > perf.dat
```
Suite des commandes, ou script, à exécuter pour produire les données.
Ensuite, il faut lancer R et exécuter le script [src/R/perf.R](src/R/perf.R) :
```
R
source(file = "../R/perf.R")
```
## Résultats préalables
### Temps d'exécution
| Jeu de test | Tri par Insertion | Tri Fusion | Tri Rapide |
|----------------------|---------------------------|---------------------------|---------------------------|
| Aléatoire | ![plot](path/to/plot.png) | ![plot](path/to/plot.png) | ![plot](path/to/plot.png) |
| Trié | ![plot](path/to/plot.png) | ![plot](path/to/plot.png) | ![plot](path/to/plot.png) |
| Tri inversé | ![plot](path/to/plot.png) | ![plot](path/to/plot.png) | ![plot](path/to/plot.png) |
<img src="src/Images/graphe_temps.png" width="500"/>
### Consommation mémoire
| Jeu de test | Tri par Insertion | Tri Fusion | Tri Rapide |
|----------------------|---------------------------|---------------------------|---------------------------|
| Aléatoire | ![plot](path/to/plot.png) | ![plot](path/to/plot.png) | ![plot](path/to/plot.png) |
| Trié | ![plot](path/to/plot.png) | ![plot](path/to/plot.png) | ![plot](path/to/plot.png) |
| Tri inversé | ![plot](path/to/plot.png) | ![plot](path/to/plot.png) | ![plot](path/to/plot.png) |
<img src="src/Images/graphe_memoire.png" width="500"/>
### Analyse des résultats préalables
Explications précises et succinctes des résultats préalables.
Grâce à ces deux graphes, nous pouvons constater qu'il y a principalement 3 types de tri :
- Les tris qui s'exécutent rapidement mais consomment beaucoup de mémoire, comme le tri fusion qui consommera toujours beaucoup de mémoire, que le tableau soit de base trié, trié dans le sens inverse ou aléatoire.
- Les tris qui consomment peu de mémoire mais s'exécutent plus lentement, comme le tri par insertion qui n'a aucun problème avec un tableau déjà trié, mais met plus de temps avec un tableau trié dans le sens inverse. Le tri à bulle lui, est aussi plus rapide avec un tableau trié mais reste lent.
- Les tris qui s'exécutent rapidement et consomment peu de mémoire, plus rare, comme le tri rapide qui cependant a beaucoup de mal avec un tableau déjà trié, voir trié dans le sens inverse.
### Discussion des résultats préalables
Explications pcises et succinctes des limites des résultats
préalables et ce qu'ils ne permettent pas de vérifier.
Certains résulats ne permettent pas de déduire que, par exemple, le tri par insertion est plus rapide sur des tableaux à moitié rangé.
Le tri rapide s'il sélectionne comme pivot le premier éléments (ou le dernier) va se retrouver bloqué ou extrêmement lent, ces cas sont particuliers et on ne peux donc pas les déterminé simplement à la simple vue des graphiques.
## Etude approfondie
### Hypothèse
Expression précise et succincte d'une hypothèse.
Le tri par insertion devient de plus en plus long quand la taille du tableau augmente, et donc celui-ci ne sait traiter efficacement uniquement des petits tableaux, étant donné que tout les autres algorithmes coupent leurs tableaux en de plus petit tableaux. Notre hypothèse est, que si le tri par insertion est donc plus performant que les autres tris sur des petit tableaux, alors nous allons l'utiliser dans les autres tris, dans notre cas nous l'utiliserons sur le tri rapide pour voir s'il est possible d'améliorer le temps d'éxécution en consommant autant ou très légérement plus de mémoire en comparant donc les résultats obtenus en exécutant le tri rapide normal avec celui optimisé.
### Protocole expérimental de vérification de l'hypothèse
Expression précise et succincte du protocole.
Pour se faire nous allons donc voir si effectivement le tri par insertion se déroule plus rapidement sur plein de petit tableaux, pour le test nous avons commencé avec des tableaux de taille 100, et au lieux de regarder le temps de chaque tri de faire le tri d'un tableau puis d'un autre, etc..., on va juste prendre le temps pour trier tout les tableaux.
En faisant certains test, nous avons aussi remarqué que le tri par insertion est encore plus rapide lorsque les tableaux à traiter sont déjà presque triés.
Tout d'abord pour tester l'hypothèse on fait un petit [script](src/Scripts/hypothese_perf.sh), ce script à été réalisé avec 1000 tableaux de 100 éléments.
```
Suite des commandes, ou script, à exécuter pour produire les données.
./hypothese_perf.sh
```
Ce qui nous donne :
![ceci](src/Images/Tri_insertion_plus_rapide.png)
Donc maintenant il faut faire un tri rapide qui utilise le tri par insertion et l'intégrer au main.
### Résultats expérimentaux
### Analyse des résultats expérimentaux
......
File moved
#!/usr/bin/python
from sys import argv
from math import *
def Helloworld1(n):
count = 0
for i in range(0,n):
for j in range(0, n):
print("Helloworld")
count += 1
return count
def Helloworld2(n):
count = 0
for i in range(0,n):
for j in range(i, n):
print("Helloworld")
count +=1
return count
def Helloworld3(n):
count = 0
if(n>1):
Helloworld3(n/2)
Helloworld3(n-(n/2))
count+=1
print("Helloworld")
return count
def version(i, n):
if(i==1):
l = Helloworld1(n)
print(l)
elif(i==2):
l=Helloworld2(n)
print(l)
elif(i==3):
l=Helloworld3(n)
# print(l)
else:
print("non")
res = log(n)
print("log count : ", res)
print("nb : ", n*res)
if(len(argv[1:])):
versio = int(argv[1])
nb = int(argv[2])
version(versio,nb)
\ No newline at end of file
op = [10, 100, 1000, 10000, 100000, 1000000]
aps = 1000
for i in op:
print("--------------", i, "---------")
print("n : ", i/aps , "s")
print("ln(n) : ", log10(i)/aps , "s")
print("n.log(n) : ", (i*(log10(i)))/aps , "s")
print("nRacine(n) : ", sqrt(i)/aps , "s")
print("n² : ", (pow(i,2))/aps , "s")
print("n³ : ", (pow(i,3))/aps/3600/24 , "jours")
if(i < 10000):
print("2^n : ", (((((pow(2,i))/aps)/3600)/24)/365)/1000000000000000000 , "Quatrillion années")
if(i <1000):
print("fact(n) : ", (((((factorial(i)/aps)/3600)/24)/365)/1000000000000000000) , "Quatrillion années" )
*.o
tri
\ No newline at end of file
src/Images/Tri_insertion_plus_rapide.png

19.7 KiB

src/Images/graphe_memoire.png

209 KiB

src/Images/graphe_temps.png

218 KiB

#include "../Tris/triInsertion.h"
#include "../Tris/triFusion.h"
#include "../Tris/triRapide.h"
#include "../Tris/triBulle.h"
#include "../Tris/triRapideInsertion.h"
#include "../Lib/utils.h"
int main(int argc, char **argv){
if(argc<3){
printf("Usage: ./tri <option> <input.txt> d \n");
exit(1);
}
struct data data;
initData(&data);
if((strcmp(argv[1], "--insertion") == 0) || strcmp(argv[1], "-i")== 0){
int n= 0;
long *tab = readToTab(argv[2], &n);
// printf("n:%d\n", n);
// printf("Base : ");
// for(int i = 0; i<n; i++){
// printf("%ld-", tab[i]);
// }
// printf("\n");
triInsertion(tab, n);
// printf("Insertion : ");
// for(int i = 0; i<n; i++){
// printf("%ld-", tab[i]);
// }
// printf("\n");
free(tab);
}
else if(strcmp(argv[1], "--fusion")== 0 || strcmp(argv[1], "-f")== 0){
int n= 0;
long *tab = readToTab(argv[2], &n);
// printf("Base : ");
// for(int i = 0; i<n; i++){
// printf("%ld,", tab[i]);
// }
// printf("\n");
triFusion(tab, n);
// printf("Fusion : ");
// for(int i = 0; i<n; i++){
// printf("%ld,", tab[i]);
// }
// printf("\n");
free(tab);
}
else if((strcmp(argv[1], "--rapide")== 0) || strcmp(argv[1], "-r")== 0){
int n= 0;
long *tab = readToTab(argv[2], &n);
// printf("Base : ");
// for(int i = 0; i<n; i++){
// printf("%ld,", tab[i]);
// }
// printf("\n");
triRapide(tab, n);
// printf("Rapide : ");
// for(int i = 0; i<n; i++){
// printf("%ld,", tab[i]);
// }
// printf("\n");
free(tab);
}
else if((strcmp(argv[1], "--rapideInsertion")== 0) || strcmp(argv[1], "-ri")== 0){
int n= 0;
long *tab = readToTab(argv[2], &n);
// printf("Base : ");
// for(int i = 0; i<n; i++){
// printf("%ld,", tab[i]);
// }
// printf("\n");
triRapideInsertion(tab, n);
printf("Rapide : ");
for(int i = 0; i<n; i++){
printf("%ld,", tab[i]);
}
printf("\n");
free(tab);
}
else if((strcmp(argv[1], "--bulle")== 0) || strcmp(argv[1], "-b")== 0){
int n= 0;
long *tab = readToTab(argv[2], &n);
// printf("Base : ");
// for(int i = 0; i<n; i++){
// printf("%ld,", tab[i]);
// }
// printf("\n");
triBulle(tab, n);
// printf("Bulle : ");
// for(int i = 0; i<n; i++){
// printf("%ld,", tab[i]);
// }
// printf("\n");
free(tab);
}
else if (strcmp(argv[1], "-a") == 0)
{
int n= 0;
long *tab = readToTab(argv[2], &n);
printf("Base : ");
for(int i = 0; i<n; i++){
printf("%ld,", tab[i]);
}
printf("\n");
triInsertion(tab, n);
printf("Insertion : ");
for(int i = 0; i<n; i++){
printf("%ld,", tab[i]);
}
printf("\n");
triFusion(tab, n);
printf("Fusion : ");
for(int i = 0; i<n; i++){
printf("%ld,", tab[i]);
}
printf("\n");
triRapide(tab, n);
printf("Rapide : ");
for(int i = 0; i<n; i++){
printf("%ld,", tab[i]);
}
printf("\n");
free(tab);
}
else if (strcmp(argv[1], "-g") == 0)
{
if(argc<4){
printf("Usage: ./tri -g <max> <size>\n");
exit(1);
}
size_t max = atoi(argv[2]);
size_t size = atoi(argv[3]);
long* tab = generate_tab(max, size);
for(size_t i = 0; i<size; i++){
printf("%ld ", tab[i]);
}
printf(".");
printf("\n");
free(tab);
}
else if (strcmp(argv[1], "-gt") == 0)
{
if(argc<4){
printf("Usage: ./tri -gt <max> <size>\n");
exit(1);
}
size_t max = atoi(argv[2]);
size_t size = atoi(argv[3]);
long* tab = generate_tab(max, size);
triRapide(tab, size);
for(size_t i = 0; i<size; i++){
printf("%ld ", tab[i]);
}
printf(".");
printf("\n");
free(tab);
}
else if (strcmp(argv[1], "-gti") == 0)
{
if(argc<4){
printf("Usage: ./tri -gti <max> <size>\n");
exit(1);
}
size_t max = atoi(argv[2]);
size_t size = atoi(argv[3]);
long* tab = generate_tab(max, size);
triRapide(tab, size);
for(size_t i = 0; i < size; i++){
printf("%ld ", tab[size-i-1]);
}
printf(".");
printf("\n");
free(tab);
}
else if (strcmp(argv[1], "-gtp") == 0)
{
if(argc<4){
printf("Usage: ./tri -gtp <max> <size>\n");
exit(1);
}
size_t max = atoi(argv[2]);
size_t size = atoi(argv[3]);
long* tab = generate_tab(max, size);
triRapide(tab, size/2);
for(size_t i = 0; i < size; i++){
printf("%ld ", tab[i]);
}
printf(".");
printf("\n");
free(tab);
}
else if((strcmp(argv[1], "--insertion-verbose") == 0) || strcmp(argv[1], "-iv")== 0){
int n= 0;
long *tab = readToTab(argv[2], &n);
printf("Base : ");
for(int i = 0; i<n; i++){
printf("%ld,", tab[i]);
}
printf("\n");
data.time = clock();
triInsertionVerbose(tab, n, &data);
long new_time = (double)clock() - data.time;
data.time = new_time;
printf("Insertion : ");
for(int i = 0; i<n; i++){
printf("%ld,", tab[i]);
}
printf("\n");
printData(data);
free(tab);
}
else if((strcmp(argv[1], "--fusion-verbose") == 0) || strcmp(argv[1], "-fv")== 0){
int n= 0;
long *tab = readToTab(argv[2], &n);
printf("Base : ");
for(int i = 0; i<n; i++){
printf("%ld,", tab[i]);
}
printf("\n");
data.time = clock();
triFusionVerbose(tab, n, &data);
long new_time = (double)clock() - data.time;
data.time = new_time;
printf("Fusion : ");
for(int i = 0; i<n; i++){
printf("%ld,", tab[i]);
}
printf("\n");
printData(data);
free(tab);
}
else if((strcmp(argv[1], "--rapide-verbose") == 0) || strcmp(argv[1], "-rv")== 0){
int n= 0;
long *tab = readToTab(argv[2], &n);
printf("Base : ");
for(int i = 0; i<n; i++){
printf("%ld,", tab[i]);
}
printf("\n");
data.time = clock();
triInsertionVerbose(tab, n, &data);
long new_time = (double)clock() - data.time;
data.time = new_time;
printf("Rapide : ");
for(int i = 0; i<n; i++){
printf("%ld,", tab[i]);
}
printf("\n");
printData(data);
free(tab);
}
else{
printf("Usage: ./tri <option> <input.txt> f\n");
}
return 0;
}
\ No newline at end of file
#include "utils.h"
long* readToTab(char* file, int *sizze){
int fd = open(file, O_RDONLY);
if(fd == -1){
perror("open");
exit(1);
}
int n = 0;
int sizet = 1000, nb_size = 1;
int nb_size_tab = 1;
size_t x=0;
char temp;
char* tmp = malloc(sizeof(char)*sizet);
memset(tmp, 0, sizet);
read(fd,&temp,sizeof(char));
int size_tab = 0;
while(temp != '.'){
if(temp == ' '){
size_tab++;
}
read(fd,&temp,sizeof(char));
}
*sizze = size_tab;
lseek(fd, 0, SEEK_SET);
long *tab = malloc(sizeof(long)*size_tab);
read(fd,&temp,sizeof(char));
while(temp != '.'){
// printf("n:%d j:%d nb_size:%d\n", n,j,nb_size);
if(temp != ' '){
tmp[x] = temp;
//printf("tmp[%d] = %c\n", x, temp);
x++;
}
else{
long t = atol(tmp);
tab[n] = t;
//printf("char:%c long:%d n:%d j:%d nb_size:%d, size:%d\n",temp,tab[j], n,j,nb_size, sizet);
memset(tmp, 0, sizet*nb_size);
x=0;
n++;
}
read(fd,&temp,sizeof(char));
}
// for(int i = 0; i<size_tab; i++){
// if(i%15 == 0)
// printf("i:%ld\n",tab[i]);
// else
// printf("i:%ld ", tab[i]);
// }
free(tmp);
return tab;
}
void initData(struct data* d){
d->time = 0;
d->comparison = 0;
d->ct_fusion = 0;
d->ct_parse = 0;
d->write = 0;
}
long* generate_tab(size_t max, size_t length){
if(length==0){
return 0;
}
long* tab = malloc(sizeof(long)*length+1);
memset(tab, 0, sizeof(long)*length+1);
size_t index = 0;
for(index = 0; index<length; index++){
long p = (long)(rand()%max);
tab[index] = p;
}
return tab;
}
void printData(struct data d){
printf("Time passed : %ld\n", d.time);
printf("Number of comparison : %ld\n", d.comparison);
printf("Number of write : %ld\n", d.write);
printf("Call of fusion : %ld\n", d.ct_fusion);
printf("Call of parsing : %ld\n", d.ct_parse);
}
\ No newline at end of file
#ifndef utils_h
#define utils_h
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <time.h>
#define TAB_SIZE 1000
struct data {
long time;
unsigned int write;
unsigned int comparison;
unsigned int ct_fusion;
unsigned int ct_parse;
};
long* readToTab(char* file, int *sizze);
void initData(struct data* d);
long* generate_tab(size_t max, size_t length);
void printData(struct data d);
#endif
library(ggplot2)
analyse <- read.table("analyse.dat", header = TRUE)
ggplot(analyse, aes(x=taille, y=temps, group=tri, colour=tri)) +
geom_point() + geom_smooth() + facet_grid(tri~sort) + ggtitle("Graphe des temps d'exécution")
ggsave("../Images/graphe_analyse_temps.png")
ggplot(analyse, aes(x=taille, y=mem, group=tri, colour=tri)) +
geom_point() + geom_smooth() + facet_grid(tri~sort) + ggtitle("Graphe des consommations mémoire")
ggsave("../Images/graphe_analyse_memoire.png")
\ No newline at end of file
library(ggplot2)
perf <- read.table("perf.dat", header = TRUE)
ggplot(perf, aes(x=taille, y=temps, group=tri, colour=tri)) +
geom_point() + geom_smooth() + facet_grid(tri~sort) + ggtitle("Graphe des temps d'exécution")
ggsave("../Images/graphe_temps.png")
ggplot(perf, aes(x=taille, y=mem, group=tri, colour=tri)) +
geom_point() + geom_smooth() + facet_grid(tri~sort) + ggtitle("Graphe des consommations mémoire")
ggsave("../Images/graphe_memoire.png")
\ No newline at end of file
sort iTest taille tri temps mem
Aleatoire 1 16324 insertion 0.29 1400
Aleatoire 1 16324 rapide 0.03 1436
Aleatoire 1 16324 rapideInsertion 0.03 1652
Trie 1 16324 insertion 0.02 1452
Trie 1 16324 rapide 0.75 2364
Trie 1 16324 rapideInsertion 10.15 5312
Trie_inverse 1 16324 insertion 0.57 1524
Trie_inverse 1 16324 rapide 0.50 2268
Trie_inverse 1 16324 rapideInsertion 0.50 2456
Trie_partiel 1 16324 insertion 14.03 1792
Trie_partiel 1 16324 rapide 5.18 3944
Trie_partiel 1 16324 rapideInsertion 5.17 3740
Aleatoire 2 42437 insertion 2.88 1672
Aleatoire 2 42437 rapide 0.12 1360
Aleatoire 2 42437 rapideInsertion 0.11 1668
Trie 2 42437 insertion 0.08 1380
Trie 2 42437 rapide 5.21 4136
Trie 2 42437 rapideInsertion 5.08 4344
Trie_inverse 2 42437 insertion 3.46 1408
Trie_inverse 2 42437 rapide 2.47 3028
Trie_inverse 2 42437 rapideInsertion 2.53 3184
Trie_partiel 2 42437 insertion 1.30 1356
Trie_partiel 2 42437 rapide 0.05 1364
Trie_partiel 2 42437 rapideInsertion 0.08 1488
Aleatoire 3 80007 insertion 5.95 1664
Aleatoire 3 80007 rapide 0.14 1736
Aleatoire 3 80007 rapideInsertion 0.13 1644
Trie 3 80007 insertion 0.14 1636
Trie 3 80007 rapide 17.72 6876
Trie 3 80007 rapideInsertion 17.59 7012
Trie_inverse 3 80007 insertion 12.17 1772
Trie_inverse 3 80007 rapide 0.15 1912
Trie_inverse 3 80007 rapideInsertion 0.18 1884
Trie_partiel 3 80007 insertion 4.49 1616
Trie_partiel 3 80007 rapide 0.14 1728
Trie_partiel 3 80007 rapideInsertion 0.13 1660
Aleatoire 4 32664 insertion 1.00 1464
Aleatoire 4 32664 rapide 0.06 1360
Aleatoire 4 32664 rapideInsertion 0.05 1480
Trie 4 32664 insertion 0.04 1460
Trie 4 32664 rapide 2.52 3356
Trie 4 32664 rapideInsertion 2.67 3516
Trie_inverse 4 32664 insertion 1.88 1452
Trie_inverse 4 32664 rapide 1.67 2776
Trie_inverse 4 32664 rapideInsertion 1.65 3056
Trie_partiel 4 32664 insertion 0.74 1404
Trie_partiel 4 32664 rapide 0.03 1384
Trie_partiel 4 32664 rapideInsertion 0.03 1532
Aleatoire 5 7988 insertion 0.05 1448
Aleatoire 5 7988 rapide 0.02 1368
Aleatoire 5 7988 rapideInsertion 0.02 1544
Trie 5 7988 insertion 0.00 1424
Trie 5 7988 rapide 0.16 1872
Trie 5 7988 rapideInsertion 0.16 2148
Trie_inverse 5 7988 insertion 0.11 1416
Trie_inverse 5 7988 rapide 0.13 1852
Trie_inverse 5 7988 rapideInsertion 0.12 1984
Trie_partiel 5 7988 insertion 0.05 1392
Trie_partiel 5 7988 rapide 0.01 1384
Trie_partiel 5 7988 rapideInsertion 0.01 1564
Aleatoire 6 69040 insertion 4.41 1672
Aleatoire 6 69040 rapide 0.08 1636
Aleatoire 6 69040 rapideInsertion Command terminated by signal 11
0.08 1740
Trie 6 69040 insertion 0.14 1628
Trie 6 69040 rapide 12.49 5944
Trie 6 69040 rapideInsertion 12.46 5992
Trie_inverse 6 69040 insertion 9.24 1684
Trie_inverse 6 69040 rapide 6.85 4612
Trie_inverse 6 69040 rapideInsertion 6.91 4528
Trie_partiel 6 69040 insertion 3.50 1644
Trie_partiel 6 69040 rapide 0.11 1672
Trie_partiel 6 69040 rapideInsertion 0.14 1640
Aleatoire 7 65534 insertion 4.22 1672
Aleatoire 7 65534 rapide 0.10 1728
Aleatoire 7 65534 rapideInsertion 0.14 1728
Trie 7 65534 insertion 0.10 1616
Trie 7 65534 rapide 11.54 5604
Trie 7 65534 rapideInsertion 0.17 1892
#!/bin/bash
echo "sort\tiTest\ttaille\ttri\ttemps\tmem"
for iTest in `seq 1 10`
do
size=$(( `od -An -N4 -tu < /dev/urandom` % 100000))
max=$(( `od -An -N4 -tu < /dev/urandom` % 100000))
for tab in "g" "gt" "gti" "gtp"
do
../tri -$tab $max $size 1 > ../tabs/perf_tab.txt
if [ $tab = "g" ]
then
sort="Aleatoire"
elif [ $tab = "gt" ]
then
sort="Trie"
elif [ $tab = "gti" ]
then
sort="Trie_inverse"
elif [ $tab = "gtp" ]
then
sort="Trie_partiel"
fi
for tri in "insertion" "rapide" "rapideInsertion"
do
res=`( /usr/bin/time -f "%U\t%M" ../tri --$tri ../tabs/perf_tab.txt > /dev/null ) 2>&1`
echo "$sort\t$iTest\t$size\t$tri\t$res"
done
done
rm ../tabs/perf_tab.txt
done
\ No newline at end of file
This diff is collapsed.
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 158
model name : Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
stepping : 10
microcode : 0xca
cpu MHz : 1407.683
cache size : 12288 KB
physical id : 0
siblings : 12
core id : 0
cpu cores : 6
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips : 5202.65
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 158
model name : Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
stepping : 10
microcode : 0xca
cpu MHz : 1047.856
cache size : 12288 KB
physical id : 0
siblings : 12
core id : 1
cpu cores : 6
apicid : 2
initial apicid : 2
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips : 5202.65
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
processor : 2
vendor_id : GenuineIntel
cpu family : 6
model : 158
model name : Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
stepping : 10
microcode : 0xca
cpu MHz : 2901.758
cache size : 12288 KB
physical id : 0
siblings : 12
core id : 2
cpu cores : 6
apicid : 4
initial apicid : 4
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips : 5202.65
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 158
model name : Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
stepping : 10
microcode : 0xca
cpu MHz : 1043.537
cache size : 12288 KB
physical id : 0
siblings : 12
core id : 3
cpu cores : 6
apicid : 6
initial apicid : 6
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips : 5202.65
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
processor : 4
vendor_id : GenuineIntel
cpu family : 6
model : 158
model name : Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
stepping : 10
microcode : 0xca
cpu MHz : 1235.295
cache size : 12288 KB
physical id : 0
siblings : 12
core id : 4
cpu cores : 6
apicid : 8
initial apicid : 8
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips : 5202.65
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
processor : 5
vendor_id : GenuineIntel
cpu family : 6
model : 158
model name : Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
stepping : 10
microcode : 0xca
cpu MHz : 1906.872
cache size : 12288 KB
physical id : 0
siblings : 12
core id : 5
cpu cores : 6
apicid : 10
initial apicid : 10
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips : 5202.65
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
processor : 6
vendor_id : GenuineIntel
cpu family : 6
model : 158
model name : Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
stepping : 10
microcode : 0xca
cpu MHz : 1481.748
cache size : 12288 KB
physical id : 0
siblings : 12
core id : 0
cpu cores : 6
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips : 5202.65
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
processor : 7
vendor_id : GenuineIntel
cpu family : 6
model : 158
model name : Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
stepping : 10
microcode : 0xca
cpu MHz : 3437.819
cache size : 12288 KB
physical id : 0
siblings : 12
core id : 1
cpu cores : 6
apicid : 3
initial apicid : 3
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips : 5202.65
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
processor : 8
vendor_id : GenuineIntel
cpu family : 6
model : 158
model name : Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
stepping : 10
microcode : 0xca
cpu MHz : 3619.588
cache size : 12288 KB
physical id : 0
siblings : 12
core id : 2
cpu cores : 6
apicid : 5
initial apicid : 5
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips : 5202.65
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
processor : 9
vendor_id : GenuineIntel
cpu family : 6
model : 158
model name : Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
stepping : 10
microcode : 0xca
cpu MHz : 3702.932
cache size : 12288 KB
physical id : 0
siblings : 12
core id : 3
cpu cores : 6
apicid : 7
initial apicid : 7
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips : 5202.65
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
processor : 10
vendor_id : GenuineIntel
cpu family : 6
model : 158
model name : Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
stepping : 10
microcode : 0xca
cpu MHz : 1067.507
cache size : 12288 KB
physical id : 0
siblings : 12
core id : 4
cpu cores : 6
apicid : 9
initial apicid : 9
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips : 5202.65
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
processor : 11
vendor_id : GenuineIntel
cpu family : 6
model : 158
model name : Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
stepping : 10
microcode : 0xca
cpu MHz : 1090.700
cache size : 12288 KB
physical id : 0
siblings : 12
core id : 5
cpu cores : 6
apicid : 11
initial apicid : 11
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips : 5202.65
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
#!/bin/bash
for i in "insertion" "fusion" "rapide"
do
echo $i
cmd=$(for j in `seq 1 $3`
do
../tri -g $2 $1 1>../tabs/hypo_tab.txt
../tri --$i ../tabs/hypo_tab.txt
done )
time $cmd
done
\ No newline at end of file
sort iTest taille tri temps mem
Aleatoire 1 60302 insertion 3.46 1620
Aleatoire 1 60302 fusion 0.08 11232
Aleatoire 1 60302 rapide 0.10 1404
Aleatoire 1 60302 bulle 1.62 1368
Trie 1 60302 insertion 0.10 1372
Trie 1 60302 fusion 0.11 11124
Trie 1 60302 rapide 10.20 5392
Trie 1 60302 bulle 0.91 1524
Trie_inverse 1 60302 insertion 6.99 1652
Trie_inverse 1 60302 fusion 0.08 11124
Trie_inverse 1 60302 rapide 5.15 3784
Trie_inverse 1 60302 bulle 11.85 1620
Trie_partiel 1 60302 insertion 2.99 1372
Trie_partiel 1 60302 fusion 0.10 11172
Trie_partiel 1 60302 rapide 2.38 2808
Trie_partiel 1 60302 bulle 3.64 1580
Aleatoire 2 45629 insertion 2.10 1384
Aleatoire 2 45629 fusion 0.06 8528
Aleatoire 2 45629 rapide 0.06 1408
Aleatoire 2 45629 bulle 8.89 1556
Trie 2 45629 insertion 0.05 1408
Trie 2 45629 fusion 0.06 8484
Trie 2 45629 rapide 5.66 4376
Trie 2 45629 bulle 26.45 1640
Trie_inverse 2 45629 insertion 3.63 1388
Trie_inverse 2 45629 fusion 0.06 8480
Trie_inverse 2 45629 rapide 1.47 2256
Trie_inverse 2 45629 bulle 6.08 1360
Trie_partiel 2 45629 insertion 1.44 1404
Trie_partiel 2 45629 fusion 0.07 8484
Trie_partiel 2 45629 rapide 0.07 1384
Trie_partiel 2 45629 bulle 7.09 1396
Aleatoire 3 3587 insertion 0.01 1428
Aleatoire 3 3587 fusion 0.00 1804
Aleatoire 3 3587 rapide 0.00 1344
Aleatoire 3 3587 bulle 0.03 1300
Trie 3 3587 insertion 0.01 1348
Trie 3 3587 fusion 0.01 1764
Trie 3 3587 rapide 0.03 1464
Trie 3 3587 bulle 0.02 1336
Trie_inverse 3 3587 insertion 0.03 1428
Trie_inverse 3 3587 fusion 0.00 1824
Trie_inverse 3 3587 rapide 0.01 1628
Trie_inverse 3 3587 bulle 0.04 1336
Trie_partiel 3 3587 insertion 0.01 1416
Trie_partiel 3 3587 fusion 0.00 1768
Trie_partiel 3 3587 rapide 0.01 1416
Trie_partiel 3 3587 bulle 0.04 1304
Aleatoire 4 98228 insertion 9.26 2032
Aleatoire 4 98228 fusion 0.17 14928
Aleatoire 4 98228 rapide 0.14 1636
Aleatoire 4 98228 bulle 23.92 1776
Trie 4 98228 insertion 0.59 1672
Trie 4 98228 fusion 0.13 12756
Trie 4 98228 rapide 12.57 5936
Trie 4 98228 bulle 9.28 1704
Trie_inverse 4 98228 insertion 17.51 2012
Trie_inverse 4 98228 fusion 0.10 12760
Trie_inverse 4 98228 rapide 6.94 4552
Trie_inverse 4 98228 bulle 14.85 1692
Trie_partiel 4 98228 insertion 6.72 1992
Trie_partiel 4 98228 fusion 0.17 18248
Trie_partiel 4 98228 rapide 0.19 1992
Trie_partiel 4 98228 bulle Command terminated by signal 11
0.13 1852
Aleatoire 5 66141 insertion 4.35 1624