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

Update numeric benchmarks to jmh #7513

Closed
wants to merge 5 commits into from
Closed

Conversation

GregoryTravis
Copy link
Contributor

@GregoryTravis GregoryTravis commented Aug 7, 2023

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

Comment on lines +50 to +54
all = Bench.build builder->
builder.group "Numbers" options group_builder->
collect_benches group_builder

all
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
all = Bench.build builder->
builder.group "Numbers" options group_builder->
collect_benches group_builder
all
Bench.build builder->
builder.group "Numbers" options group_builder->
collect_benches group_builder

fun = pair.at 1
IO.println <| "Benchmarking decimal " + name
Bench.measure (decimals.map fun) name iter_size num_iterations
IO.println <| "Benchmarking " + name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to get rid of such printlns, because they will start being printed also when only gathering benchmark structure.

Suggested change
IO.println <| "Benchmarking " + name

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I think that as well. They are, indeed, printed during the benchmark gathering.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another thing is that initialization which is relatively heavy also happens at the gathering step, slowing it down a bit.

But I don't think we have a good solution for this yet. I have an idea how we might do this, but I don't think it's in the scope of this PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not in scope of this PR, but it might be in the scope of #7519

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The setup and teardown approaches related discussion is at #7519 (review)

@GregoryTravis GregoryTravis deleted the numeric-bench-jmh branch May 8, 2024 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants