Skip to content

Papercuts with #[bench] #7655

Closed
Closed
@catamorphism

Description

@catamorphism
  1. #[bench] functions that have the wrong type signature get silently ignored. This should be an error.
  2. Running a compiled thing with #[bench]s in it yields:
running 1 test
test g ... bench: 16 ns/iter (+/- 0)
result: ok. 0 passed; 0 failed; 0 ignored

The last line (0 passed/0 failed/0 ignored) is confusing here, since it did run something.

  1. I don't think there's much documentation of #[bench] -- specifically that you have to compile with --test and run with --bench.

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