Skip to content

Reproducible randomness in setup for BenchmarkGroups #201

Open

Description

@gustaphe

When working with random numbers or would be useful to have a way to guarantee that each benchmark in a group uses the same series of numbers. Unless I'm mistaken there is no way to do this now.

If BenchmarkGroup had a property setup::Function which was evaluated for each Benchmark, one could use setup=()->seed! (1234) to make sure that the benchmark runs use the same sets of numbers.

Or setupcould be an Expr so you could create a new rng.

Activity

  1. changed the title [-]Setup for BenchmarkGroups[/-] [+]Reproducible randomness in setup for BenchmarkGroups[/+] on Jun 13, 2023
  2. gdalle commented on Sep 18, 2023

    @gdalle
    Collaborator

    Wanna try a PR @gustaphe ?

  3. gustaphe commented on Sep 21, 2023

    @gustaphe
    ContributorAuthor

    @gdalle Sure

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions