Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.
This repository was archived by the owner on Apr 11, 2024. It is now read-only.

Too many significant digits being reported #259

@BurtHarris

Description

@BurtHarris

The Benchmark results typically reported by these runs report a mean number of ops/sec with too many significant digits. Reporting the confidence interval is great, but all the digits reported make it hard to compare results.

I'm trying to remember the math behind this, but if the confidence interval is +/- 1%, it seems there should be no more than 3 significant digits reported, isn't that right?

This can be done fairly easily using the number's toPrecision( digits ) method. The returned value is a string and can be in scientific notation. Under normal circumstances, it shouldn't need commas.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions