Correciones para reentrenamiento
This commit is contained in:
23
utils/graficas.py
Normal file
23
utils/graficas.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
# Datos de número de esferas y tiempos de ejecución
|
||||
esferas = [2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
tiempo_sin_opt = [0.000352, 0.000665, 0.001057, 0.001575, 0.002254, 0.003026, 0.003879, 0.004943, 0.006069]
|
||||
tiempo_con_opt = [0.000415, 0.000782, 0.001290, 0.001933, 0.002772, 0.003041, 0.004010, 0.005100, 0.006061]
|
||||
|
||||
# Crear la gráfica
|
||||
plt.figure(figsize=(8, 5))
|
||||
plt.plot(esferas, tiempo_sin_opt, marker="o", linestyle="-", label="Tiempo sin optimizar")
|
||||
plt.plot(esferas, tiempo_con_opt, marker="s", linestyle="--", label="Tiempo optimizado (-O2)")
|
||||
|
||||
plt.xlabel("Número de Esferas")
|
||||
plt.ylabel("Tiempo de ejecución (s)")
|
||||
plt.title("Comparación de Tiempos de Ejecución con y sin Optimización")
|
||||
plt.legend()
|
||||
plt.grid(True)
|
||||
|
||||
# Guardar la imagen en el mismo directorio
|
||||
plt.savefig("comparacion_tiempos.png")
|
||||
|
||||
# Mostrar la gráfica
|
||||
plt.show()
|
Reference in New Issue
Block a user