Skip to content

feat: add speedup visualization plots and normalize arithmetic/geometric mean calculations#35

Open
shangkunwang01 wants to merge 2 commits intomainfrom
shangkun-evaluation-visual-and-summary
Open

feat: add speedup visualization plots and normalize arithmetic/geometric mean calculations#35
shangkunwang01 wants to merge 2 commits intomainfrom
shangkun-evaluation-visual-and-summary

Conversation

@shangkunwang01
Copy link
Copy Markdown
Collaborator

  1. Add distribution and barplot for visualize the speedup.
  2. Cap the speedup at 1 for mean calculation.

@shangkunwang01 shangkunwang01 requested a review from NinaCai May 4, 2026 19:12
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use 1.05 or 1.1 to avoid numbers like 1.00001?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I added a threshhold value there. It will only influence the improvement_ratio.

max_speedup = max(improvements) if improvements else 0
speedups_cliped = [max(speed, 1) for speed in speedups]
arithmetic_mean_speedup = (
sum(speedups_cliped) / len(speedups_cliped) if speedups_cliped else 0
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we use speedups_cliped to calculate mean?

Also, when visualize_speed_up, do you use clipped or the original?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Because the optimized code can be slower than the reference code (speedup < 1) but if that is the case, we can just use the reference code. This seems to be a common practice to report results;
  2. In visualize_speed_up I use original so that it is easier for us to find those bad cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants