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

Don't print error when printing standard deviation in comparison #110

Closed
ivoanjo opened this issue Feb 10, 2021 · 4 comments
Closed

Don't print error when printing standard deviation in comparison #110

ivoanjo opened this issue Feb 10, 2021 · 4 comments

Comments

@ivoanjo
Copy link
Contributor

ivoanjo commented Feb 10, 2021

Hello there! Thanks a lot for benchmark-ips :)

Today I was using it for a few tests and noticed that whenever the percentage of standard deviation shows up in the comparison, it's always zero. E.g. with the example on the README.md I get:

Warming up --------------------------------------
            addition     2.390M i/100ms
           addition2     5.597M i/100ms
           addition3     5.260M i/100ms
addition-test-long-label
                         2.377M i/100ms
Calculating -------------------------------------
            addition     23.737M (± 3.0%) i/s -    119.519M in   5.040228s
           addition2     54.560M (± 3.0%) i/s -    274.271M in   5.031700s
           addition3     52.988M (± 1.8%) i/s -    268.258M in   5.064310s
addition-test-long-label
                         24.121M (± 1.3%) i/s -    121.248M in   5.027489s

Comparison:
           addition2: 54560399.9 i/s
           addition3: 52988283.5 i/s - same-ish: difference falls within error
addition-test-long-label: 24121165.9 i/s - 2.26x  (± 0.00) slower <-- zero?
            addition: 23736650.2 i/s - 2.30x  (± 0.00) slower <--- zero?

Every benchmark I also ran today always showed the (± 0.00) in the comparison. Is this expected?

I'm using benchmark-ips version 2.8.4, using different Ruby versions, on macOS.

@nateberkopec
Copy link
Collaborator

We don't calculate error for standard deviation, so this is expected.

Maybe we shouldn't bother printing it, though.

@ivoanjo
Copy link
Contributor Author

ivoanjo commented Feb 11, 2021

I think it would be useful to still have the error for the values itself on the comparison, but yeah that's more of a separate feature, so yeah hiding the (± 0.00) sounds like the way to go here :)

@nateberkopec nateberkopec changed the title Comparison always seems to show the percentage of standard deviation as zero Don't print error when printing standard deviation in comparison Feb 11, 2021
@kbrock
Copy link
Contributor

kbrock commented Feb 18, 2021

I think that is saying that this is basically close enough.

@jtbg
Copy link
Contributor

jtbg commented Mar 30, 2023

as of release 2.11.0, standard deviation mode returns nil instead of zero for the error. (see #124)

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

No branches or pull requests

4 participants