Project 'vmariada/helloworld' was moved to 'vanimaria/helloworld'. Please update any links and bookmarks that may still have the old path.
Select Git revision
Forked from
Vuillemot Romain / INF-TC1
Source project has a limited visibility.
-
Romain Vuillemot authoredRomain Vuillemot authored
test_analyse.py 583 B
#%%
import time
import random
import matplotlib.pyplot as plt
import numpy as np
#%matplotlib inline
nvalues = [100, 500, 1000, 1500, 2000, 2500, 3000]
timesEtudiants1 = []
for i in nvalues:
random.seed()
p = 12**2 # Ordre de grandeur des valeurs
liste = []
for x in range(i): liste.append(random.randint(0, p))
a=time.perf_counter()
e1 = []
for n in liste:
e1.append(n)
b=time.perf_counter()
timesEtudiants1.append(b-a)
plt.plot(nvalues,timesEtudiants1, "r-", label="Etudiants 1")
plt.title("Comparaison des performances")
# %%