Skip to content

Number of significant digits in @btime seems to be an overkill #288

@rafael-guerra-www

Description

@rafael-guerra-www

Running @btime multiple times, three of them shown below, outputs:
281.849 ns (7 allocations: 176 bytes)
279.452 ns (7 allocations: 176 bytes)
282.479 ns (7 allocations: 176 bytes)

The observed variability in the results suggests that printing 6 digits is non-sense (let alone in this case going to 1/1000 of nanosecond precision).
Suggest that printing only 3 significant digits should be enough:
282 ns (7 allocs: 176 bytes)
279 ns (7 allocs: 176 bytes)
282 ns (7 allocs: 176 bytes)

This issue is independent of the units printed (μs, ms, etc)

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