Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task90 Performance analysis timing graphs #106

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/TimePreprocessing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/TimeSolver.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions docs/TimingPlot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import matplotlib.pyplot as plt

# Timed on Matlab 2022 on intel i7, 8-core 3.8GHz

# Preprocessing plot
m = [149.6, 377.5,1352.2] # matlab timing. time the full constructor phase.
p = [166.8, 904.4,4810.4] # Python 3.10 on same PC specs.


N = [50, 100,200]
# n=50 iterates over two levels.
# n= 100 has three levels
# n= 200 has four levels


plt.plot(N, p,marker='x', linestyle='', label='Python Implementation')
plt.plot(N, m, marker='o', linestyle='', label='Matlab Implementation')

plt.xticks([50,100,200]) # Set the positions of the ticks
plt.gca().set_xticklabels([50,100,200]) # Set the labels of the ticks
plt.xlim(00, 250) # Adjust the limits of the x-axis to control the width

plt.xlabel('Sqrpoisson Data set of Size N', fontsize=20)
plt.ylabel('Runtime (ms)', fontsize=20)
plt.title('Preprocessing Phase', fontsize=20)
plt.legend(fontsize=18)
plt.legend(loc='upper left')


plt.savefig('TimePreprocessing.png', dpi=300) # Save as PNG format with 300 dpi resolution
plt.show()

plt.clf()
#
# Solver Phase plot
m1 = [31.0,44.2,91.3] # matlab timing. time the full solving phase.
p1 = [193.2, 1313.8,8398.9]



plt.plot(N, p1,marker='x', linestyle='', label='Python Implementation')
plt.plot(N, m1, marker='o', linestyle='', label='Matlab Implementation')

plt.xticks([50,100,200]) # Set the positions of the ticks
plt.gca().set_xticklabels([50,100,200]) # Set the labels of the ticks
plt.xlim(00, 250) # Adjust the limits of the x-axis to control the width

plt.xlabel('Sqrpoisson Data set of Size N', fontsize=20)
plt.ylabel('Runtime (ms)', fontsize=20)
plt.title('Solver Phase', fontsize=20)
plt.legend(fontsize=18)
plt.legend(loc='upper left')


plt.savefig('TimeSolver.png', dpi=300) # Save as PNG format with 300 dpi resolution
plt.show()
Loading