Fix inputs and add methods

This commit is contained in:
2026-05-07 13:55:02 +01:00
parent a77f75dcf4
commit 0f693a5de0
12 changed files with 500 additions and 93 deletions
+24
View File
@@ -0,0 +1,24 @@
import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv("benchmark.csv")
plt.figure(figsize=(10, 6))
plt.plot(df["elements"], df["hash"], marker='o', label="Hash map")
plt.plot(df["elements"], df["array"], marker='o', label="Array")
# LOG SCALE
plt.xscale("log")
plt.yscale("log")
plt.xlabel("Number of elements (log scale)")
plt.ylabel("Time (ms) (log scale)")
plt.title("Array vs Hash Map Lookup Performance")
plt.grid(True, which="both", linestyle="--", alpha=0.5)
plt.legend()
plt.show()
plt.savefig("benchmark.png", dpi=200, bbox_inches="tight")