Skip to content

Add error bars to charts#77

Merged
yinamy merged 2 commits into
wasmfx:mainfrom
yinamy:error-bar
May 28, 2026
Merged

Add error bars to charts#77
yinamy merged 2 commits into
wasmfx:mainfrom
yinamy:error-bar

Conversation

@yinamy
Copy link
Copy Markdown
Contributor

@yinamy yinamy commented May 27, 2026

No description provided.

@yinamy yinamy requested a review from ezrakilty May 27, 2026 16:12
Comment thread plot_benchmarks.py
# First we want the standard deviations as percentages of the mean:
data_stddev_percent = np.divide(data_stddev, data)
# Then we apply the formula for error propagation for division
ratio_stddev = ratio * np.sqrt(np.square(data_stddev_percent[:, 0]) + np.square(data_stddev_percent[:, 1]))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rather than using all the colon/comma sort of notation, can we break out the different pieces and name them? That'll help me keep track.

Comment thread plot_benchmarks.py
for i, engine in enumerate(engines):
# Get array of data from this engine
engine_data = data[(i)*(len(benches)):(i+1)*(len(benches))].flatten()
engine_data_stddev = data_stddev[(i)*(len(benches)):(i+1)*(len(benches))].flatten()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These lines are a lot to chew on. Any combinator (or refactoring) you could use to make them easier to read?

Copy link
Copy Markdown
Contributor

@ezrakilty ezrakilty left a comment

Choose a reason for hiding this comment

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

Looks pretty good. I think we'll want to do some refactoring to make this clearer, but it's a great step forward!

@yinamy yinamy merged commit d419432 into wasmfx:main May 28, 2026
@yinamy yinamy deleted the error-bar branch May 28, 2026 12:16
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